Skip to content

Instantly share code, notes, and snippets.

@shobbo
Created March 10, 2012 02:44
Show Gist options
  • Save shobbo/2009788 to your computer and use it in GitHub Desktop.
Save shobbo/2009788 to your computer and use it in GitHub Desktop.
Fajny kod :)
/*
* cicmp --
* do case-independent strcmp
*/
int
cicmp(const char *cp)
{
int len;
char *bp;
for (len = 0, bp = lbp; *cp && (*cp &~ ' ') == (*bp++ &~ ' ');
++cp, ++len)
continue;
if (!*cp) {
lbp += len;
return (YES);
}
return (NO);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment