strnlen

Returns the number of bytes in a string.

Format

#include  <string.h>

size_t strnlen  (const char *s, size_t n);

Arguments

s
Pointer to the string.
n
The maximum number of characters to examine.

Description

This function returns the number of bytes in the string pointed to by s. The string length value does not include the terminating null character. The strnlen function counts bytes until the first null byte or until n bytes have been examined.

Return Values
The length of the string. 


Previous Page | Next Page | Table of Contents | Index