Length
Returns how many bytes have been written.
Module: Text
Signature
rux
func Length(self) -> uint;Returns
The number of bytes written so far, which is not the Capacity — a builder holds a block that is usually bigger than what has been put in it.
The count is in bytes, so a multi-byte UTF-8 sequence counts once per byte.
Example
rux
import Text::StringBuilder;
var builder = StringBuilder::WithCapacity(64);
builder.Append("Rux");
builder.Length(); // 3
builder.Capacity(); // 64
builder.Free();See also
StringBuilder— the builder typeCapacity— how much room the block hasIsEmpty— theLength() == 0case