I know strings in Erlang can be costly to use. So how do I convert "5"
to 5
?
Is there anything like io:format("~p",[5])
that would return a formatted string instead of printing to a stream?
There's also integer_to_list/1
, which does exactly what you want, without the ugliness.