No subject
Fco Javier Burgos Maciá
fjburgos@REDACTED
Mon Sep 16 17:01:47 CEST 2002
Hello. I'm a student from Spain and I have a question.
Is made in erlang any function to convert a term to a string representation?
The term can be a tuple, a tuple of lists, a list of tuples of strings or atoms ...
I have tried to make it using the module io_lib, but I have problems like this:
1> String=io_lib:fwrite("~p",[{atom1,[{1,2,[atom_2,"string"]}]}]).
[[123,
["atom1",
44,
[91,[[123,["1",44,"2",44,[91,["atom_2",44,"\"string\""],93]],125]],93]],
125]]
2> String.
[[123,
["atom1",
44,
[91,[[123,["1",44,"2",44,[91,["atom_2",44,"\"string\""],93]],125]],93]],
125]]
In this case, I want to obtain "{atom1,[{1,2,[atom_2,"string"]}]}"
Will I have to make the function or Does it exist already?
Thank you in advance and excuse my English.
More information about the erlang-questions
mailing list