
Andrew J Bromage wrote:
G'day all.
Avagoodweekend.
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 for us, this problem has been around for a while now, and a solution may be found 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 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's the breaks. As for removing vowels, instead of proposing a solution, I choose to dispute that the problem needs solving and claim victory. Cheers, Andy -- Andy Moran Ph. (503) 526 3472 Galois Connections Inc. Fax. (503) 350 0833 3875 SW Hall Blvd. http://www.galois.com Beaverton, OR 97005 moran@galois.com