Cldr.Map.floatize_values
You're seeing just the function
floatize_values
, go back to Cldr.Map module for more information.
Transforms a map
's String.t
values to Float.t
values.
Arguments
map
is anymap/0
options
is a keyword list of options passed todeep_map/3
The map value is converted to a float
from
a String.t
only when the
value is comprised of a valid float form.
Values which cannot be converted to a float
are returned unchanged.
Examples
iex> Cldr.Map.floatize_values %{a: %{b: "1.0"}}
%{a: %{b: 1.0}}
iex> Cldr.Map.floatize_values %{a: %{b: "1"}}
%{a: %{b: 1.0}}