structTextBuilder
struct TextBuilder
buffer: int
capacity: int
used: int
endbuilder: builds big text quickly. use "builder.jamo"
Joining text with + copies all of it each time, so building a big text piece by piece gets slow. A TextBuilder keeps the pieces in one buffer that doubles when it's full, and makes the text once at the end.
struct TextBuilder
buffer: int
capacity: int
used: int
endfunc new_builder(): TextBuilder
func TextBuilder.room(extra: int)
func TextBuilder.add(text: string)
func TextBuilder.line(text: string)
Adds the text, then a new line
func TextBuilder.add_int(value: int)
func TextBuilder.length(): int
How many bytes it holds so far
func TextBuilder.text(): string
Everything added, as one text
func TextBuilder.clear()
Starts over, keeping its buffer