Summary

There is a plethora of options available in the way of string manipulation with the system libraries. The String class provides basic string handling but has many methods available for returning new strings with various modifications.

For sophisticated string manipulation, use the StringBuilder class. It allows modification of the string in the same object without the overhead of creating a new object with each operation.

Strings need to be formatted for many processing activities. There are simple number formatting options as well as picture formatting.

A welcome feature of the system libraries is regular expressions. Regular expressions allow powerful string manipulation that is more efficient than either String or StringBuilder class ...

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.