Bug in ci_string example in web pages

Giovanni Bajo rasky@develer.com
Fri Jun 17 14:31:00 GMT 2005


Jonathan Wakely <cow@compsoc.man.ac.uk> wrote:

> maybe we should just link to www.gotw.ca instead of hosting the message?
> Then we can punt the responsibility to Herb and ask him to fix it :)

Sounds like a good plan!
 
> Hmm, http://www.gotw.ca/gotw/029.htm has the same code, but his book has
> this:
> 
>     static const char*
>     find( const char* s, int n, char a ) {
>       while( n-- > 0 && tolower(*s) != tolower(a) ) {
>           ++s;
>       }
>       return n >= 0 ? s : 0;
>     }

This version is correct too.
-- 
Giovanni Bajo



More information about the Libstdc++ mailing list