Interface Segments

interface Segments {
    [iterator](): SegmentIterator<SegmentData>;
    containing(codeUnitIndex?: number): SegmentData;
}

Methods

  • Returns an object describing the segment in the original string that includes the code unit at a specified index.

    Parameters

    • OptionalcodeUnitIndex: number

      A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to 0.

    Returns SegmentData