以下對C#中string類的方法進行匯總:
1.string (char[]) 使用指定的字符串數組構建一個新的string對象
2.int Compare(string a,string b,bool case) 比較字符串a,b,case為true時表示不區分大小寫。當a>b返回正數,當a<b返回負數,a=b返回0
3. bool EndsWith(string) 確定當前字符串是否以指定的字符串結尾
4. bool StartsWith(string) 確定當前字符串是否以指定的字符串開頭
5.int IndexOf() 返回指定的字符或字符串在當前字符串中的位置
6.int LastIndexOf() 返回指定字符或字符串的最后一個匹配項位置
7.string Insert(int,string) 在當前的字符串中插入一個指定的字符串
8.string Replace