Erlang string from list

萝らか妹 提交于 2019-12-13 15:28:23

问题


I have erlang list symbols: [104, 105, 106, 107 ...] How can i got string from this list:

"hijk..."?

Thank you.


回答1:


Strings as a datatype do not exist in Erlang. Stings are simply lists of characters.

[104, 105, 106, 107] and "hijk" are perfectly equivalent.

In fact, if you type the original list in the shell you get back the "string":

1> [104, 105, 106, 107].   
"hijk"


来源:https://stackoverflow.com/questions/10276982/erlang-string-from-list

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!