complete-reference-vb_net_30
complete-reference-vb_net_30
Kicks out individual characters or a range from the object. Use Remove to
flush the object
Replace Lets you replace all occurrences of a specified character or a collection of
characters in the object with other specified characters
As you can imagine, this method is heavily overloaded so that you can append the full gamut of data types
into your object.
The following example chews through the long date and time String pushed out by Index Server to inform
you of the last time a file it is stalking was modified:
So the value "02/02/2002 14:26:47 PM" is reduced to "02/02/2002." You might first grasp for a String
manipulator method, but the For Next loop chews down this particular String like a wolf on lamb ribs.
AppendFormat
The AppendFormat method adds text to the end of the StringBuilder object, but also implements the
IFormattable interface and therefore accepts the standard format Strings described in the formatting section.
You can use this method to customize the format of variables and append those values to a StringBuilder
object. The following code example uses the AppendFormat method to place an integer value formatted as a
currency value at the end of a StringBuilder object:
Insert
The Insert method adds a String or object to a specified position in your StringBuilder object. The
following code snippet uses this method to insert a word into the sixth position of a StringBuilder class:
Remove
You can use the Remove method to remove a specified number of characters from the current StringBuilder
object, beginning at a specified zero−based index. The following code example uses the Remove method to
shorten a StringBuilder's value:
514