Module ec_cnv

Copyright © (C) 2012 Erlware, LLC.

Authors: Eric Merritt (ericbmerritt@gmail.com).

Function Index

is_false/1
is_true/1
to_atom/1 Automation conversion a term to an existing atom.
to_binary/1 Known limitations: Converting [256 | _], lists with integers > 255.
to_boolean/1
to_float/1 Automatic conversion of a term into float type.
to_float/2
to_integer/1 Automatic conversion of a term into integer type.
to_integer/2
to_list/1 Automatic conversion of a term into Erlang list.
to_number/1 Automatic conversion of a term into number type.

Function Details

is_false/1

is_false(X1::binary() | string() | atom()) -> boolean()

is_true/1

is_true(X1::binary() | string() | atom()) -> boolean()

to_atom/1

to_atom(X::atom() | list() | binary() | integer() | float()) -> atom()

Automation conversion a term to an existing atom. badarg is returned if the atom doesn't exist. the safer version, won't let you leak atoms

to_binary/1

to_binary(X::atom() | string() | binary() | integer() | float()) -> binary()

Known limitations: Converting [256 | _], lists with integers > 255

to_boolean/1

to_boolean(X1::binary() | string() | atom()) -> boolean()

to_float/1

to_float(X::string() | binary() | integer() | float()) -> float()

Automatic conversion of a term into float type. badarg if strict is defined and an integer value is passed.

to_float/2

to_float(X::string() | binary() | integer() | float(), S::strict | nonstrict) -> float()

to_integer/1

to_integer(X::string() | binary() | integer() | float()) -> integer()

Automatic conversion of a term into integer type. The conversion will round a float value if nonstrict is specified otherwise badarg

to_integer/2

to_integer(X::string() | binary() | integer() | float(), S::strict | nonstrict) -> integer()

to_list/1

to_list(X::atom() | list() | binary() | integer() | float()) -> list()

Automatic conversion of a term into Erlang list

to_number/1

to_number(X::binary() | string() | number()) -> number()

Automatic conversion of a term into number type.


Generated by EDoc, May 1 2024, 06:09:58.