literalLines

inline fun String.literalLines(width: Int = 40, cutLongWords: Boolean = true, lineBuilder: (line: String) -> Component = { it.literal }): List<Component>(source)

Returns a list of Component elements which all do not exceed the given width.

Parameters

width

the maximum width of one line

cutLongWords

if true, the maximum width will always be enforced but cutting long words in the middle

lineBuilder

responsible for building the literal of each line