3.10. Strings
The System.String class contains methods to manipulate strings. Using methods of this class, we can determine a string's length, search for substrings, change the case of a string, compare two strings, split strings, and perform other string-related operations. Once created, an instance of a String class cannot be changed – all methods that modify a string return a new instance that contains the modification. The StringBuilder class in the System.Text namespace should be used to create strings, the content of which can be modified. In Microsoft .NET, strings are zero-based, that is, the first character in a string has the index zero.
The String class implements IComparable, ICloneable, IConvertible, and IEnumerable interfaces. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access