I have very long string returned from os:cmd. My exe-file output contains some symbols with code 4, so i replaced them with other symbol and put meta in the beginning of the output. Now i want to replace symbols back. How i can do it in quickest way?
I have very long string returned from os:cmd. My exe-file output contains some symbols
Share
Erlang strings are lists. Erlang lists are immutable. So you can’t change particular bytes within a string, you can only generate another string with these bytes replaced.
Either replace the characters again (using
map), or pass the original string around.