Re: Faster lower() command
- Posted by Jesse Adkins <Tassadar29 at lycos.com> Jan 20, 2007
- 555 views
jacques deschĂȘnes wrote: > > here is the power of euphoria > > }}} <eucode> > function lower(object o) > return o + (o>='A' and o<='Z')*32 -- work as well with atom or sequence > end function > </eucode> {{{ > > > regards, > Jacques D. I'm well aware of that command, since it's what's in place already. The command that I put up for display processes a sequence much faster than the current code for lower(). A test I ran, with all letters in caps, ran about twice as fast as the current code. I kept the original code for doing atoms, since the guru.ex code doesn't work so well with atoms for some reason I'm hoping the code I posted earlier could become part of Euphoria some day, despite the fact that it's a good deal larger than the current lower() command. -- Jesse Adkins.