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