Subversion Repositories HelenOS

Compare Revisions

Regard whitespace Rev 2639 → Rev 2640

/trunk/uspace/lib/libc/include/string.h
46,6 → 46,7
int bcmp(const char *s1, const char *s2, size_t n);
 
int strcmp(const char *, const char *);
int strncmp(const char *, const char *, size_t n);
 
char *strcpy(char *dest, const char *src);
char *strncpy(char *dest, const char *src, size_t n);
/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)