1STRLEN(3) Linux Programmer's Manual STRLEN(3)
2
3
4
6 strlen - calculate the length of a string
7
9 #include <string.h>
10
11 size_t strlen(const char *s);
12
14 The strlen() function calculates the length of the string pointed to by
15 s, excluding the terminating null byte ('\0').
16
18 The strlen() function returns the number of characters in the string
19 pointed to by s.
20
22 For an explanation of the terms used in this section, see
23 attributes(7).
24
25 ┌──────────┬───────────────┬─────────┐
26 │Interface │ Attribute │ Value │
27 ├──────────┼───────────────┼─────────┤
28 │strlen() │ Thread safety │ MT-Safe │
29 └──────────┴───────────────┴─────────┘
31 POSIX.1-2001, POSIX.1-2008, C89, C99, C11, SVr4, 4.3BSD.
32
34 string(3), strnlen(3), wcslen(3), wcsnlen(3)
35
37 This page is part of release 4.16 of the Linux man-pages project. A
38 description of the project, information about reporting bugs, and the
39 latest version of this page, can be found at
40 https://www.kernel.org/doc/man-pages/.
41
42
43
44GNU 2016-03-15 STRLEN(3)