2 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\" References consulted:
7 .\" Linux libc source code
8 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
10 .\" Modified Sat Jul 24 18:02:26 1993 by Rik Faith (faith@cs.unc.edu)
11 .TH strlen 3 (date) "Linux man-pages (unreleased)"
13 strlen \- calculate the length of a string
16 .RI ( libc ", " \-lc )
19 .B #include <string.h>
21 .BI "size_t strlen(const char *" s );
26 function calculates the length of the string pointed to by
28 excluding the terminating null byte (\[aq]\e0\[aq]).
32 function returns the number of bytes in the string pointed to by
35 For an explanation of the terms used in this section, see
41 Interface Attribute Value
46 T} Thread safety MT-Safe
51 POSIX.1-2001, C89, SVr4, 4.3BSD.
53 In cases where the input buffer may not contain
54 a terminating null byte,
56 should be used instead.