Skip to main content

Span.to_utf_16_span

to_utf_16_span

Documentation​

Converts the span of extended grapheme clusters to a corresponding span of UTF-16 code units.

Examples​

Find the span of code units corresponding to the span of extended grapheme clusters.​

text = 'ae\u301fz' (Span.Value (Range 1 3) text).to_utf_16_span == (Utf_16_Span.Value (Range 1 4) text)