1STRLEN(3)                  Linux Programmer's Manual                 STRLEN(3)
2
3
4

NAME

6       strlen - calculate the length of a string
7

SYNOPSIS

9       #include <string.h>
10
11       size_t strlen(const char *s);
12

DESCRIPTION

14       The strlen() function calculates the length of the string pointed to by
15       s, excluding the terminating null byte ('\0').
16

RETURN VALUE

18       The strlen() function returns the number of bytes in the string pointed
19       to by s.
20

ATTRIBUTES

22       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
23       tributes(7).
24
25       ┌────────────────────────────────────────────┬───────────────┬─────────┐
26Interface                                   Attribute     Value   
27       ├────────────────────────────────────────────┼───────────────┼─────────┤
28strlen()                                    │ Thread safety │ MT-Safe │
29       └────────────────────────────────────────────┴───────────────┴─────────┘
30

CONFORMING TO

32       POSIX.1-2001, POSIX.1-2008, C89, C99, C11, SVr4, 4.3BSD.
33

SEE ALSO

35       string(3), strnlen(3), wcslen(3), wcsnlen(3)
36

COLOPHON

38       This page is part of release 5.12 of the Linux  man-pages  project.   A
39       description  of  the project, information about reporting bugs, and the
40       latest    version    of    this    page,    can     be     found     at
41       https://www.kernel.org/doc/man-pages/.
42
43
44
45GNU                               2021-03-22                         STRLEN(3)
Impressum