Interface Segments
interface Segments {
[iterator](): SegmentIterator<SegmentData>;
containing(codeUnitIndex?: number): SegmentData;
}
[iterator](): SegmentIterator<SegmentData>;
containing(codeUnitIndex?: number): SegmentData;
}
Index
Methods
Methods
[iterator]
- [iterator](): SegmentIterator<SegmentData>
Returns SegmentIterator<SegmentData>
containing
- containing(codeUnitIndex?): SegmentData
Returns an object describing the segment in the original string that includes the code unit at a specified index.
Parameters
Optional
codeUnitIndex: numberA number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to
0
.
Returns SegmentData
Returns an iterator to iterate over the segments.