This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in ci_string example in web pages


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]