List.to_string

You're seeing just the function to_string, go back to List module for more information.

Specs

to_string(:unicode.charlist()) :: String.t()

Converts a list of integers representing code points, lists or strings into a string.

To be converted to a string, a list must either be empty or only contain the following elements:

  • strings
  • integers representing Unicode code points
  • a list containing one of these three elements

Note that this function expects a list of integers representing Unicode code points. If you have a list of bytes, you must instead use the :binary module.

Examples

iex> List.to_string([0x00E6, 0x00DF])
"æß"

iex> List.to_string([0x0061, "bc"])
"abc"

iex> List.to_string([0x0064, "ee", ['p']])
"deep"

iex> List.to_string([])
""