String class method in C # Summary

The following summarize the method of the string class in C #:

1.string (char []) using the specified string array to build a new string object

 

2.int Compare (string a, string b, bool case) compare strings a, b, case represents a case-insensitive to true. When a> b returns a positive number, if a <b returns negative, a = b returns 0

 

3. bool EndsWith (string) to determine whether the current string specified string end

 

4. bool StartsWith (string) to determine whether the current string string specified at the outset

 

5.int IndexOf () returns the position of the specified character or string in the current string

 

6.int LastIndexOf () Returns the specified character string or a match last position

 

7.string Insert (int, string) is inserted into a character string specified in the current string

 

8.string Replace

Guess you like

Origin www.cnblogs.com/zengxh/p/12390570.html