Is there an elegant guard test for strings?

Claes Wikstrom <>
Tue Aug 16 23:28:21 CEST 2005


Tony Hobbins wrote:
> Hi all,
> 
> I hope this question is not as stupid as it sounds.
> 
> What is the most elegant guard construct for testing for a string?

There isn't any.

Need to do it through case statement

case is_string(L) of
   true ->
     stuff(L);


/klacke



More information about the erlang-questions mailing list