IsEmpty
Reports whether anything has been written.
Module: Text
Signature
rux
func IsEmpty(self) -> bool;Returns
true when Length is 0.
It says nothing about the Capacity: a builder that has been Cleared is empty but still holds its block, and so is one built with WithCapacity that has not been appended to.
Example
rux
import Text::StringBuilder;
var builder = StringBuilder::WithCapacity(64);
builder.IsEmpty(); // true -- room reserved, nothing written
builder.Append("Rux");
builder.IsEmpty(); // false
builder.Clear();
builder.IsEmpty(); // true, and the 64 bytes are still there
builder.Free();See also
StringBuilder— the builder typeLength— the byte count this tests against zeroClear— empty the builder without releasing the block