New
Creates an empty builder.
Module: Std
Signature
rux
func New() -> StringBuilder;Returns
StringBuilder — an empty builder with no buffer allocated yet.
Description
New is the usual starting point. No memory is allocated until the first Append (or Reserve); the buffer then grows on demand. If you already know roughly how many bytes you'll write, use WithCapacity to allocate once up front.
Example
rux
import Std::StringBuilder;
var sb = StringBuilder::New();
sb.Append("ready");See also
StringBuilder— the typeWithCapacity— start with capacity reserved