welibc
A clear, secure, and well documented standard C library
Functions
strlen.c File Reference

Defines the strlen function. More...

#include <string.h>
Include dependency graph for strlen.c:

Go to the source code of this file.

Functions

size_t strlen (const char *s)
 Computes the length of a string. More...
 

Detailed Description

Defines the strlen function.

Definition in file strlen.c.

Function Documentation

◆ strlen()

size_t strlen ( const char *  s)

Computes the length of a string.

Parameters
*sString having its length computed

The strlen function computes the length of the string pointed to by s.

Note
If an error or wrapping occurs, a value of 0 is returned
Returns
The number of characters that precede the terminating null character

Definition at line 51 of file strlen.c.

Referenced by strcat(), strcmp(), strcpy(), strcspn(), strncat(), strncmp(), strncpy(), strrchr(), and strstr().

Here is the caller graph for this function: