A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/reference/regex/regex_traits/length/ below:

public member function

<regex>

std::regex_traits::length
static size_t length (const char_type* p);

Return length of string

Returns the length of the string represented by the null-terminated character sequence pointed by p.

Similar in semantics to the strlen C function.

In regex_traits it is defined as an alias of its homonym in char_traits:


1
2
3
static size_t length (const char_type* p) {
  return char_traits<char_type>::length(p);
}

Parameters
p
A pointer to the first character in a null-terminated character sequence.

Return value The number of characters in the null-terminated character sequence pointed by the argument passed (until the terminating null character, but without including it).
char_type is a member type, defined as an alias of regex_traits's template parameter (charT).

See also
strlen
Get string length (function)
char_traits
Character traits (class template)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4