Strings

No discussion about a foundation class library would be complete without talking about the capabilities it provides for storing and manipulating strings. We have already covered some aspects of string manipulation, such as converting bytes to strings using various encoding schemes. In this section, let's look at some other important string manipulation classes provided by the .NET Framework.

The System.String class that we are used to by now stores a string of Unicode characters. This class offers many useful features, such as the following:

  • Obtaining the length of the string

  • Checking if two strings are equal

  • Comparing two strings for a lexical relationship

  • Concatenating one or more strings to create a new string

  • Replacing a substring with ...

Get .NET Programming: A Practical Guide Using C# now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.