buildAnsiString

A helper method to generate ANSI output from a lambda block.

For example:

println(buildAnsiString {
red { text("Hello, ") }
green { text("World!") }
})