[erlang-questions] Integer list to string list conversion
Serge Aleynikov
serge@REDACTED
Mon Feb 26 21:02:37 CET 2007
1> [integer_to_list(I) || I <- [2,3,4,5]].
["2","3","4","5"]
or
2> lists:map(fun(I) -> integer_to_list(I) end, [2,3,4,5]).
["2","3","4","5"]
Serge
Prabhuram K wrote:
> Hello All,
> I am a newbie to erlang and I wanted to convert list of integers to a
> list of strings. For example,
> [2,3,4,5] to ["2", "3", "4","5"]. Any help would be highly appriciated.
>
> Thanks,
> Prabhu
More information about the erlang-questions
mailing list