All the solutions that have been posted so far have serious
internationalization/localization problem. They all make the
assumption that A-Za-z are the only alphabetic characters. This
is a very short-sighetd assumption. You're better off using the POSIX
isalpha or isdigit functions which are locale aware.