KetraTerm
API · v0.3.0All versions

TerminalCompletionMatchRanges

Immutable ordered match ranges relative to one completion display string.

Ranges use UTF-16 offsets and are stored as packed primitive pairs internally. Every range is non-empty, ranges are ordered and non-overlapping, and endpoints are Unicode-scalar boundaries that do not split surrogate pairs. The empty instance is shared; non-empty factories defensively copy caller-owned arrays.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Number of [start, end) ranges.

Functions

Link copied to clipboard

Returns an independent packed [start0, end0, ...] array.

Link copied to clipboard
fun endOffset(index: Int): Int

Returns the exclusive UTF-16 end offset of range index.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Returns whether no display fragment is matched.

Link copied to clipboard
fun startOffset(index: Int): Int

Returns the inclusive UTF-16 start offset of range index.

Link copied to clipboard
open override fun toString(): String