Erlang , , io_lib.
IP- - io_lib: latin1_char_list (Term)
http://erlang.org/doc/man/io_lib.html#latin1_char_list-1
io_lib: latin1_char_list/1 :
latin1_char_list([C|Cs]) when is_integer(C), C >= $\000, C =< $\377 ->
latin1_char_list(Cs);
latin1_char_list([]) -> true;
latin1_char_list(_) -> false.
Unicode,
io_lib: char_list (Term)
http://erlang.org/doc/man/io_lib.html#char_list-1
io_lib: char_list/1 :
char_list([C|Cs]) when is_integer(C), C >= 0, C < 16
is_integer(C), C > 16
is_integer(C), C > 16
char_list(Cs);
char_list([]) -> true;
char_list(_) -> false.
io_lib .
Please note that if some new erlang function is not available in your version supported by your project, you can simply copy the implementation of new erlang versions and add them to your own module. Find the latest erlang / lib / * / src source code and just get the new features you need.
source
share