converting capital letters into small letters
Fri, 26 Jul 2002 08:52:03 -0700
Andrew J Bromage wrote:
> G'day all.
> On Fri, Jul 26, 2002 at 01:27:48AM +0000, Karen Y wrote:
> > 1. How would I convert capital letters into small letters?
> > 2. How would I remove vowels from a string?
> As you've probably found out, these are very hard problems.
i agree, and I also agree that Haskell hasn't got it quite right. Luckily=
us, this problem has been around for a while now, and a solution may be f=
in a C library, known as "ctype.h". It provides this function:
int tolower(int c);
So with a little foreign import magic, and a bit of map (details left to=20
reader), we're golden! Caveat: this doesn't necessarily work for Unicode=
but it's a start. And you've got to stay within the IO monad. But them'=
As for removing vowels, instead of proposing a solution, I choose to disp=
that the problem needs solving and claim victory.
Andy Moran Ph. (503) 526 34=
Galois Connections Inc. Fax. (503) 350 08=
3875 SW Hall Blvd. http://www.galois.c=
Beaverton, OR 97005 email@example.com=