int kstrncmp(
const char *istr1,
const char *istr2,
size_t num)
none
none
char *s1 = "Same-DIFFERENT";
char *s2 = "Same-different";
kprintf("Same is %d\n", kstrncmp(s1, s2, 5));
kprintf("Different is %d\n", kstrncmp(s1, s2, 10));
The output will be:
Same is 0 Different is -32
$BOOTSTRAP/objects/library/kutils/src/strings.c