How can I determine if a list is a just a string or a list of strings?

Magnus Falk magnus.falk@REDACTED
Thu Sep 10 18:04:00 CEST 2009


Hi all,

I have a variable that can either contain a list of strings or a just a
string. Is there a good way to tell what kind I'm, dealing with?

"192.168.1.18" vs. ["192.168.1.18", "192.168.1.19"]

Cheers,
Magnus

P.S. I posted this question on Stackoverflow as well:
http://stackoverflow.com/questions/1406173/how-can-i-determine-if-a-list-is-a-just-a-string-or-a-list-of-stringsD.S.


More information about the erlang-questions mailing list