[erlang-questions] Formatting strings with named arguments
Imants Cekusins
imantc@REDACTED
Sun Feb 15 20:44:23 CET 2015
io_lib:format
substitutes multiple placeholders, converts to string, does padding.
You could
1) search for named placeholders using re:run
2) replace placeholders with ~s or ~p using re:replace
3) prepare a list with substitutes from a map|dict
4) pass this list to io_lib:format.
A bit of work but doable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150215/a16ff7b9/attachment.htm>
More information about the erlang-questions
mailing list