Module str
Authors: Serge Aleynikov (saleyn(at)gmail(dot)com).
Description
Parse transform that implements str/2
{parse_transform,str}
compiler's option to use this transform.
str(Fmt, Args) -> lists:flatten(io_lib:format(Fmt, Args))
throw(Fmt, Args) -> throw(lists:flatten(io_lib:format(Fmt, Args))
i2l(Int) -> integer_to_list(Int) % Enabled with compiled with
% the `{d,str_i2l}' option
b2l(Bin) -> binary_to_list(Bin) % Enabled with compiled with
% the `{d,str_b2l}' option
str(Term) -> str:str(Term)
Function Index
get_float_fmt/0 | Get custom float format from the process dictionary. |
parse_transform/2 | Parse transform to be used by providing {parse_transform, str} option. |
reset_float_fmt/0 | Erase custom float format from the process dictionary. |
set_float_fmt/1 | Store custom float format in the process dictionary Return previously stored format. |
str/1 | Stringify an argument. |
str/2 |
Function Details
get_float_fmt/0
get_float_fmt() -> any()
Get custom float format from the process dictionary
parse_transform/2
parse_transform(AST, Opts) -> any()
Parse transform to be used by providing {parse_transform, str}
option.
reset_float_fmt/0
reset_float_fmt() -> any()
Erase custom float format from the process dictionary
set_float_fmt/1
set_float_fmt(Opts) -> any()
Store custom float format in the process dictionary Return previously stored format. Also see float_to_list/2 http://erlang.org/doc/man/erlang.html#float_to_list-2
str/1
str(I :: term()) -> string()
Stringify an argument
str/2
str(I, Opts) -> any()