On Mon, 2006-07-24 at 18:17 +0200, Paul J Stevens wrote:

> Maybe I'm dense, but shouldn't we use g_ascii_strncasecmp instead of
> g_ascii_strcasecmp??
[snip]
> So I believe that should be:
> 
> > char * g_strcasestr(const char *haystack, const char *needle)
> > {
> >         // Like strstr, but case insensitive.
> >         size_t n = strlen(needle);
> >         for (; *haystack; haystack++) {
> >                 if (g_ascii_strncasecmp(haystack, needle, n) == 0)
> >                         return (char *)haystack;
> >         }
> > 
> >         return NULL;
> > }

Ah, yes. Thanks. 

Meanwhile, I've finally found true civilization in Budapest: an
excellent cafe with free wireless :-)

Aaron

Reply via email to