Chapter 25. String Manipulation

In This Chapter

  • The String Class

  • The StringBuilder Class

  • String Formatting

  • Regular Expressions

The base class libraries include an extensive set of APIs for working with strings. This chapter goes beyond the string type and introduces specialized classes that make working with strings easier.

The String class is similar to the string type, but with much more power. Although the String class is very robust, it is also immutable, which means that once a String object is created, it can't be modified.

When there is a need to manipulate strings, use the StringBuilder class. The StringBuilder class isn't as streamlined as the String class, but it is built especially for modifying strings in any way necessary.

A topic ...

Get C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.