Wishes: hex-output

Torbjorn Tornkvist tobbe@REDACTED
Thu Feb 1 13:08:52 CET 2001


Or alternatively:

ucase([C|Cs]) when C>=$a,C=<$z -> [C-32|ucase(Cs)]; % a-z
ucase([C|Cs])                  -> [C|ucase(Cs)];
ucase([])                      -> [].

lcase([C|Cs]) when C>=$A,C=<$Z -> [C+32|lcase(Cs)]; % A-Z
lcase([C|Cs])                  -> [C|lcase(Cs)];
lcase([])                      -> [].

capw([C|Cs]) when C>=$a,C=<$z  -> [C-32|lcase(Cs)]; 
capw(Cs)                       -> lcase(Cs). 

Cheers /Tobbe



More information about the erlang-questions mailing list