UnicodeLineBreakEnumerator Struct

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

Enumerates the positions where a line can or must break. See Unicode.EnumerateLineBreaks.

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

Remarks

The rules are those of Unicode Standard Annex #14 revision 57 (Unicode 18.0.0). A rule reads the classes of the units around a position; a unit is a character with the combining marks and zero width joiners that follow it (rule LB9). The enumerator keeps the two units before the position, reads at most three units after it, and summarizes what the rules need from further back in a few counters, so the cost is linear.

With a LineBreakDictionary, a run of Complex_Context characters is segmented piece by piece when the enumeration reaches it, and the enumerator only keeps the word starts of the current piece: the cost stays linear and nothing is allocated.

Properties

NameDescription
CurrentGets the current break.

Gets the current break.

public readonly UnicodeLineBreak Current { get; }

Property value

UnicodeLineBreak

Methods

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

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

public readonly UnicodeLineBreakEnumerator GetEnumerator()

Returns

UnicodeLineBreakEnumerator This instance.

Moves to the next break.

public bool MoveNext()

Returns

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