Allocates a new string that contains the sequence of characters currently contained in the string builder argument. The contents of the string builder are copied; subsequent modification of the string builder does not affect the newly created string.
This constructor is provided to ease migration to
StringBuilder. Obtaining a string from a string builder via the
toString method is likely to run faster and is generally preferred.
builder
| A StringBuilder |
Diagram: String