Struct GraphemeCluster
Represents a Unicode grapheme cluster and metadata derived while enumerating it.
public readonly ref struct GraphemeCluster
- Inherited Members
Constructors
GraphemeCluster(ReadOnlySpan<char>, int, int, int, GraphemeClusterFlags, CodePoint)
Initializes a new instance of the GraphemeCluster struct.
public GraphemeCluster(ReadOnlySpan<char> span, int utf16Offset, int codePointCount, int terminalCellWidth, GraphemeClusterFlags flags, CodePoint firstCodePoint)
Parameters
spanReadOnlySpan<char>The UTF-16 span containing the grapheme cluster.
utf16OffsetintThe UTF-16 offset of the cluster in the original source.
codePointCountintThe number of Unicode scalar values in the cluster.
terminalCellWidthintThe policy-resolved terminal cell width of the cluster.
flagsGraphemeClusterFlagsThe cluster flags derived while scanning the cluster.
firstCodePointCodePointThe first code point in the cluster.
Properties
CodePointCount
Gets the number of Unicode scalar values in the cluster.
public int CodePointCount { get; }
Property Value
FirstCodePoint
Gets the first code point in the cluster.
public CodePoint FirstCodePoint { get; }
Property Value
Flags
Gets the cluster flags derived while scanning the cluster.
public GraphemeClusterFlags Flags { get; }
Property Value
Span
Gets the UTF-16 span containing the grapheme cluster.
public ReadOnlySpan<char> Span { get; }
Property Value
TerminalCellWidth
Gets the policy-resolved terminal cell width of the cluster.
public int TerminalCellWidth { get; }
Property Value
Utf16Length
Gets the UTF-16 length of the cluster.
public int Utf16Length { get; }
Property Value
Utf16Offset
Gets the UTF-16 offset of the cluster in the original source.
public int Utf16Offset { get; }