Skip to content
Menu
Contents

Reading the tags

pure

Same arguments, same result; touches nothing outside.

pure if arg2 is

Pure when that argument is a pure function; otherwise as impure as it is.

impure

Reads or changes something outside the program.

UTF8

1 function

Reading a String as UTF-8 text rather than bytes. Everything else on strings counts bytes; codePoints is how to walk a string's characters.

UTF8.codePoints("hé")
Returns
[104, 233]

At a glance

  • codePoints

    A string's code points, in order: cut on UTF-8 code-point boundaries, not on bytes or grapheme clusters.

Functions

codePoints

(String) -> List(Int)pure

A string's code points, in order: cut on UTF-8 code-point boundaries, not on bytes or grapheme clusters. Decoding is structural. A byte that does not start a complete, well-formed sequence is a code point of its own, 0 … 255, and a well-formed sequence that is not a scalar value (an overlong form, a surrogate) is its assembled value.

Reading the tags

pure

Same arguments, same result; touches nothing outside.

pure if arg2 is

Pure when that argument is a pure function; otherwise as impure as it is.

impure

Reads or changes something outside the program.