appendText method
Appends text directly to the StringBuffer, avoiding O(n) copy from toString() + concatenation. Returns the complete text length after appending.
Implementation
int appendText(String text) {
_textBuffer.write(text);
return _textBuffer.length;
}