Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition
by Paul J. Deitel - Deitel & Associates, Inc., Harvey M. Deitel - Deitel & Associates, Inc.
16.10. Class StringBuilder
The String class provides many capabilities for processing Strings. However, a String’s contents can never change. Operations that seem to concatenate Strings are in fact creating new Strings (e.g., the &= operator creates a new String and assigns it to the String variable on the left side of the operator).
The next several sections discuss the features of class StringBuilder (namespace System.Text), used to create and manipulate dynamic string information—that is, mutable strings. Every StringBuilder can store the number of characters specified by its capacity. Exceeding the capacity of a StringBuilder makes the capacity expand to accommodate the additional characters. As we will see, members of class StringBuilder ...
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