PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
strncmp.c
1#define SYSCLIB_DISABLE_BUILTINS
2#include <sysclib.h>
3
4int strncmp(const char *_l, const char *_r, size_t n)
5{
6 const unsigned char *l=(void *)_l, *r=(void *)_r;
7 if (!n--) return 0;
8 for (; *l && *r && n && *l == *r ; l++, r++, n--);
9 return *l - *r;
10}