strlen man page

strlen — calculate the length of a string

Synopsis

#include <string.h>

size_t strlen(const char *s);

Description

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

Return Value

The strlen() function returns the number of characters in the string pointed to by s.

Attributes

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue
strlen()Thread safetyMT-Safe

Conforming to

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

See Also

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

Colophon

This page is part of release 4.08 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.

Referenced By

bson_append_array(3), bson_append_array_begin(3), bson_append_code_with_scope(3), bson_append_date_time(3), bson_append_dbpointer(3), bson_append_decimal128(3), bson_append_document(3), bson_append_document_begin(3), bson_append_double(3), bson_append_int32(3), bson_append_int64(3), bson_append_iter(3), bson_append_maxkey(3), bson_append_minkey(3), bson_append_now_utc(3), bson_append_null(3), bson_append_oid(3), bson_append_regex(3), bson_append_symbol(3), bson_append_timestamp(3), bson_append_time_t(3), bson_append_timeval(3), bson_append_undefined(3), bson_append_utf8(3), bson_append_value(3), bson_creating(3), bson_init_from_json(3), bson_new_from_json(3), lber-types(3), strchr(3), str_copy(3), str_diff(3), str_diffn(3), str_equal(3), string(3), str_len(3), strnlen(3), waffle_error(3), wcslen(3).

2016-03-15 GNU Linux Programmer's Manual