Back to API Reference
Struct

TextScanResult

sealed

Per-block facts produced by one scan pass.

public static TextScanResult Combine()

Facts for the concatenation a + b: a CR ending a before an LF starting b is one separator, and a high surrogate ending a before a low surrogate starting b is one scalar.

public int chars

UTF-16 code units.

public int codepoints

Unicode scalar values; an unpaired surrogate or an invalid UTF-8 byte counts as one (it decodes to U+FFFD).

public int separators

Paragraph separators: LF, NEL, PS, U+001C–U+001E, and CR not followed by LF.

public uint flags
public int lastCodepoint

Last scalar of the block (an unpaired UTF-16 surrogate keeps its unit value), or -1 when empty.

public int firstCodepoint

First scalar of the block (an unpaired UTF-16 surrogate keeps its unit value), or -1 when empty.