gleam/beam/charlist

Casting erlang charlist to and from a gleam string.

A charlist is a list of integers where all the integers are valid code points. In practice, you will not come across them often, except perhaps when interfacing with Erlang, in particular when using older libraries that do not accept binaries as arguments.

Types

List of codepoints

pub external type Charlist

Functions

pub external fn from_string(String) -> Charlist

Transform a string to a charlist

pub external fn to_string(Charlist) -> String

Transform a charlist to a string