Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
|
#include <string.h>
Go to the source code of this file.
Functions | |
int | strncmp (const char *s1, const char *s2, size_t n) |
Compares at most n characters of two possibly null-terminated arrays. More... | |
int strncmp | ( | const char * | s1, |
const char * | s2, | ||
size_t | n | ||
) |
Compares at most n characters of two possibly null-terminated arrays.
Compares at most count characters of two possibly null-terminated arrays. The comparison is done lexicographically.
The behavior is undefined when access occurs past the end of either array s1 or s2. The behavior is undefined when either s1 or s2 is the null pointer.
s1 | pointers to the null-terminated byte strings to compare |
s2 | pointers to the null-terminated byte strings to compare |
n | maximum number of characters to compare |
Definition at line 12 of file strncmp.c.
References NULL.
Referenced by strnstr().