K3StringBuilder

A mutable sequence of characters and markers. Allows to efficiently build K3String objects.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun append(atomsToAdd: IntArray)

Append raw atoms to this K3StringBuilder.

fun append(value: String)

Append a string to this K3StringBuilder.

fun append(value: K3String)

Append a K3String to this K3StringBuilder.

Link copied to clipboard
fun appendCodePoint(codePoint: Int)

Append a codepoint to this K3StringBuilder.

Link copied to clipboard
fun appendMarker(marker: K3Marker)

Append a marker to this K3StringBuilder.

Link copied to clipboard
fun appendMarkerById(markerId: Int)

Append a marker by its markerId to this K3StringBuilder.

Link copied to clipboard
fun clear()

Removes all atoms from this K3StringBuilder.

Link copied to clipboard
fun insert(index: Int, value: K3String)

Insert a K3String at the given index.

Link copied to clipboard
fun insertCodePoint(index: Int, codePoint: Int)

Insert a codepoint at a given index.

Link copied to clipboard
fun insertMarker(index: Int, marker: K3Marker)

Insert a marker at a given index.

Link copied to clipboard
fun insertMarkerById(index: Int, markerId: Int)

Insert a marker by its markerId at a given index.

Link copied to clipboard

Returns true if the K3StringBuilder is empty (contains no atoms), false otherwise.

Link copied to clipboard

Returns true if the K3StringBuilder is not empty (contains atoms), false otherwise.

Link copied to clipboard
fun prependCodePoint(codePoint: Int)

Insert a codepoint at index 0.

Link copied to clipboard
fun prependMarker(marker: K3Marker)

Insert a marker at index 0.

Link copied to clipboard
fun prependMarkerById(markerId: Int)

Insert a marker by its markerId at index 0.

Link copied to clipboard
fun reorder()

Reorder the atoms with the default Normalizer.

Link copied to clipboard
fun replace(range: IntRange, value: K3String)

Replace the range in this K3StringBuilder with the given value.

Link copied to clipboard

Constructs a new K3String from this K3StringBuilder.

Link copied to clipboard
fun toText(): String

Constructs a new string from this K3StringBuilder.