Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
|
#include <string.h>
Go to the source code of this file.
Functions | |
char * | strnstr (const char *s, const char *find, size_t slen) |
Finds the first occurrence of find in the initial slen characters of the object pointed to by s. More... | |
char* strnstr | ( | const char * | s, |
const char * | find, | ||
size_t | slen | ||
) |
Finds the first occurrence of find in the initial slen characters of the object pointed to by s.
Locates the first occurrence of the null-terminated string find in the string s, where not more than slen characters are searched. Characters that appear after a ‘\0’ character are not searched.
The behavior is undefined if either find or s is not a pointer to a null-terminated byte string.
s | pointer to the null-terminated byte string to examine |
find | pointer to the null-terminated byte string to search for |
slen | maxinum number of characters to search for |
Definition at line 48 of file strnstr.c.