string:to_float/1 behavior

Alexey Romanov alexey.v.romanov@REDACTED
Wed Jan 12 16:11:58 CET 2011


1) Where can I find its source? It isn't defined in
lib/stdlib-1.17.1/src/string.erl. I thought it must be a BIF, but "ack
to_float /usr/local/lib/erlang/" doesn't seem to find anything
relevant. The full output is at https://gist.github.com/776256, but 1)
the only C function found is in
lib/erl_interface-3.7.1/src/legacy/erl_marshal.c; 2) the Erlang code
doesn't seem to define any mapping for this name.

2) The reason I went looking for its code is to check whether it is
guaranteed to deal with both "." and "," as decimal separators,
independent of locale? It does on my machine (with
LC_NUMERIC="en_US.UTF-8") but the string module documentation doesn't
say anything.

Yours, Alexey Romanov


More information about the erlang-questions mailing list