splitAt

fun splitAt(index: Int): Pair<Str, Str>

Splits an [fansi.Str] into two sub-strings, preserving the colors in each one.

Parameters

index

the plain-text index of the point within the [fansi.Str] you want to use to split it.