Package
Conforms to
Initializers
Methods
Class π
Mutable sequence of characters (βstring builderβ).
Initializers
π
π
Creates an empty π with an initial capacity of 16.
πβΆοΈπ‘
πβΆοΈπ‘ string π‘
Creates a π with the contents of the provided string and a capacity of the length of the string plus 16.
Methods
πΊβοΈ
β£οΈ βοΈ πΊ strdata π§ offset π’ bytes π’
Copies bytes
bytes from offset
of strdata
to the end of the string. The data must be valid UTF-8 data or the behavior is undefined.
π»πΈπ§βοΈ
β£οΈ βοΈ π»πΈπ§ byte π§
Appends a single byte to the end of the string. The caller is reponsible for ensuring that the resulting string is still valid UTF-8 or undefined behavior is caused.
π»πΈπ£βοΈ
β£οΈ βοΈ π»πΈπ£ codepoint π’ β‘οΈ π
Appends a single codepoint to the end of the string. If the codepoint is not valid, the method returns π and the string builder is not modified.
πβοΈ
βοΈ π β‘οΈ π’
Returns the number of UTF-8 bytes required to represent the content of the instance.