StringBuf

typeStringBuf

A mutable string type

It is possible to mutate this type in place, allowing for faster manipulation. In particular, adding chars or String to the end of this type is much cheaper than using + or String.append.

functionas_string(self: StringBuf) String

Get the underlying String of this StringBuf

functionfrom(s: String) StringBuf

Create a StringBuf with an initial String

functionnew() StringBuf

Create a new empty StringBuf

functionpush_char(self: StringBuf, c: char)

Add a char to the end of this StringBuf

functionpush_string(self: StringBuf, s: String)

Add a String to the end of this StringBuf