Skip to content

Commit 84966ae

Browse files
committed
Elaborate on codepoints and the :binary module in String.to_char_list
1 parent 9cae962 commit 84966ae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/elixir/lib/string.ex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,13 @@ defmodule String do
13811381
@doc """
13821382
Converts a string into a char list.
13831383
1384+
Specifically, this functions takes a UTF-8 encoded binary and returns a list of its integer
1385+
codepoints. It is similar to `codepoints/1` except that the latter returns a list of codepoints as
1386+
strings.
1387+
1388+
In case you need to work with bytes, take a look at the
1389+
[`:binary` module](http://erlang.org/doc/man/binary.html).
1390+
13841391
## Examples
13851392
13861393
iex> String.to_char_list("æß")

0 commit comments

Comments
 (0)