PPrinter
data class PPrinter(val defaultWidth: Int = 100, val defaultHeight: Int = 500, val defaultIndent: Int = 2, val defaultEscapeUnicode: Boolean = false, val defaultShowFieldNames: Boolean = true, val colorLiteral: Attrs = FansiColor.Green, val colorApplyPrefix: Attrs = FansiColor.Yellow, val showGenericForCollections: Boolean = true) : Walker
Parameters
default Width
How wide to allow a pretty-printed value to become before wrapping
default Height
How tall to allow the pretty-printed output to become before truncated it with a ...
default Indent
How many spaces to indent each nested [Tree.Apply] by
color Literal
What color to assign to literals like "lol" or 31337
color Apply Prefix
What color to assign to Foo in Foo(bar, baz)
additional Handlers
Provide this to override how certain types are pretty-printed at runtime
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun tokenize(x: Any?, width: Int = defaultWidth, height: Int = defaultHeight, indent: Int = defaultIndent, initialOffset: Int = 0, escapeUnicode: Boolean = defaultEscapeUnicode, showFieldNames: Boolean = defaultShowFieldNames): Iterator<Str>
Converts an [Any] into an iterator of colored chunks, wrapped at a certain width and truncated at a certain height