UnicodeWordEnumerator Struct

  • Obsolete: Types with embedded references are not supported in this version of your compiler.

Enumerates the segments between the word boundaries of a text. See Unicode.EnumerateWordBoundaries.

[Obsolete("Types with embedded references are not supported in this version of your compiler.", true)]
public ref struct UnicodeWordEnumerator

Properties

NameDescription
CurrentGets the range of the current segment in the text.
CurrentKindGets whether the current segment is a word, and which kind of word: a number, letters, kana or an ideograph.

Gets the range of the current segment in the text.

public readonly Range Current { get; }

Property value

Range

Gets whether the current segment is a word, and which kind of word: a number, letters, kana or an ideograph.

public readonly UnicodeWordKind CurrentKind { get; }

Property value

UnicodeWordKind

Remarks

The segment is word-like, as the isWordLike property of Intl.Segmenter says, when the kind is not UnicodeWordKind.None. See UnicodeWordKind for the rules. The kind is computed from the end of the segment when the property is read, so the enumeration costs nothing more when it is not used.

Methods

NameDescription
GetEnumerator()Returns this instance, so that the enumerator can be used by a foreach statement.
MoveNext()Moves to the next segment.

Returns this instance, so that the enumerator can be used by a foreach statement.

public readonly UnicodeWordEnumerator GetEnumerator()

Returns

UnicodeWordEnumerator This instance.

Moves to the next segment.

public bool MoveNext()

Returns

bool true when there is a segment; false at the end of the text.