Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2639 → Rev 2640

/trunk/uspace/lib/libc/generic/string.c
144,7 → 144,17
}
 
int strncmp(const char *a, const char *b, size_t n)
{
size_t c = 0;
 
while (c < n && a[c] && b[c] && (!(a[c] - b[c])))
c++;
return ( c < n ? a[c] - b[c] : 0);
}
 
/** Return pointer to the first occurence of character c in string
* @param str scanned string
* @param c searched character (taken as one byte)