TreeConnectors

data class TreeConnectors(val branch: String, val vertical: String, val lastBranch: String, val empty: String)(source)

The four glyph strings used to draw the tree branches in prettyString.

Each value is the literal text emitted at the matching position:

  • branch precedes a child that is not its parent's last child.

  • lastBranch precedes a child that is its parent's last child.

  • vertical is accumulated into the prefix of the descendants of a non-last child (it keeps the vertical guide line going).

  • empty is accumulated into the prefix of the descendants of a last child (no guide line is needed past the last branch).

Use Default for the box-drawing style or Ascii for a plain-ASCII style, or supply your own.

Constructors

Link copied to clipboard
constructor(branch: String, vertical: String, lastBranch: String, empty: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

drawn before a non-last child.

Link copied to clipboard

continuation prefix for descendants of a last child.

Link copied to clipboard

drawn before the last child.

Link copied to clipboard

continuation prefix for descendants of a non-last child.