日期:2010-01-03 浏览次数:20454 次
- namespace Tools.Module
- {
- public class Tools
- {
- public Tools()
- {
- }
- public static string GetStrFromStr(string src,int Index)
- {
- if(src.IndexOf(",")==0) src = src.Remove(0,1);
- for(int i=0;i<Index;i++)
- {
- src = src.Remove(0,1+src.IndexOf(","));
- }
- if(src.IndexOf(",")<0) return src;
- else return src.Substring(0,src.IndexOf(","));
- }
- /// <summary>
- /// 计算出某字符在一个升序排序字符串中应处的位置.
- /// </summary>
- /// <param name="src">字符串</param>
- /// <param name="c">字符</param>
- /// <returns>该字符应处的位置</returns>
- public static int