Equals (String value)
Returns a bool type, compares equality, and is similar to "= ="
Compareto (String value)
Judging size, large return 1 small return-1 equal return 0
IndexOf (String value)
Find this character in the current string, starting with the first one, finding the index where it was found the first time, and if it cannot find the return-1
Example: 1123 If you look for 1, return 0.
LastIndexOf (String value)
The same as above, but from the back forward, return the first index found
Example: 1123 If you look for 1, return 1.
Join (String value,string[] string,int statindex,int count) //After two parameters one is the starting index, one is the number of functions
This method is not the same as other methods, the call is made from string, the function is to concatenate the array through a string to return a string
String[] ary={"A", "B", "C"};
String Result=string.join ("_", ary);
The value of the last result is A_b_c connected by "_".
Split (char value)
Separates a string type with char. Example:
String[] ary;string str2;string str1= "A_b_c_d"; ary=str1. Split ('_'); Note that the parameter of the method is a char type, which returns an array of foreach (string s in ary) { str2+=s;}
The last str2 value is ABCD
SubString (int index,int length)
Intercepts a specified length of string from a specified position
String str1= "ABCDEFG"; str1. SubString, str1 the result is bcstr1. SubString (2,3);
The CDE 2 represents the index position, and 3 indicates the length
ToLower ();
Convert all to lowercase
Touper ();
Convert all to Uppercase
Trim ();
Remove front and back spaces