Struct WordSegment
Represents a segment between two Unicode word boundaries.
public readonly ref struct WordSegment
- Inherited Members
Constructors
WordSegment(ReadOnlySpan<char>, int, int, int)
Initializes a new instance of the WordSegment struct.
public WordSegment(ReadOnlySpan<char> span, int utf16Offset, int codePointOffset, int codePointCount)
Parameters
spanReadOnlySpan<char>The UTF-16 span containing the word-boundary segment.
utf16OffsetintThe UTF-16 offset of the segment in the original source.
codePointOffsetintThe code point offset of the segment in the original source.
codePointCountintThe number of Unicode scalar values in the segment.
Properties
CodePointCount
Gets the number of Unicode scalar values in the segment.
public int CodePointCount { get; }
Property Value
CodePointOffset
Gets the code point offset of the segment in the original source.
public int CodePointOffset { get; }
Property Value
Span
Gets the UTF-16 span containing the word-boundary segment.
public ReadOnlySpan<char> Span { get; }
Property Value
Utf16Length
Gets the UTF-16 length of the segment.
public int Utf16Length { get; }
Property Value
Utf16Offset
Gets the UTF-16 offset of the segment in the original source.
public int Utf16Offset { get; }