Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
|
#include <string.h>
Go to the source code of this file.
Functions | |
size_t | strnlen (const char *str, size_t maxlen) |
Returns the length of the given null-terminated byte string. More... | |
size_t strnlen | ( | const char * | str, |
size_t | maxlen | ||
) |
Returns the length of the given null-terminated byte string.
Same as
The behavior is undefined if str points to a character array which lacks the null character and the size of that character array < maxlen; in other words, an erroneous value of maxlen does not expose impending buffer overflow.
str | pointer to the null-terminated byte string to be examined |
maxlen | maximum number of characters to examine |
Definition at line 21 of file strnlen.c.
Referenced by strncat(), and strncpy().