Table of Contents

Struct WordSegment

Namespace
SixLabors.Fonts.Unicode
Assembly
SixLabors.Fonts.dll

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

span ReadOnlySpan<char>

The UTF-16 span containing the word-boundary segment.

utf16Offset int

The UTF-16 offset of the segment in the original source.

codePointOffset int

The code point offset of the segment in the original source.

codePointCount int

The 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

int

CodePointOffset

Gets the code point offset of the segment in the original source.

public int CodePointOffset { get; }

Property Value

int

Span

Gets the UTF-16 span containing the word-boundary segment.

public ReadOnlySpan<char> Span { get; }

Property Value

ReadOnlySpan<char>

Utf16Length

Gets the UTF-16 length of the segment.

public int Utf16Length { get; }

Property Value

int

Utf16Offset

Gets the UTF-16 offset of the segment in the original source.

public int Utf16Offset { get; }

Property Value

int