Esc

next_grapheme

procedureextensionsince 0.36.1Source
  • macOS: next_grapheme works on macOS
  • Linux: next_grapheme works on Linux
  • Windows: next_grapheme works on Windows
  • Wasm: next_grapheme works on Wasm

Finds the cluster end from a known boundary; decodes only through that cluster and its lookahead. Example: end, error := next_grapheme("éx", 0); gives 3.

Signature

next_grapheme :: (
    text: string,
    index: int,
    options: Unicode_Text_Options = .{}
) -> (int, Unicode_Text_Error)

See also