std::regex_traits<CharT>::length (3) - Linux Manuals
std::regex_traits<CharT>::length: std::regex_traits<CharT>::length
Command to display std::regex_traits<CharT>::length
manual in Linux: $ man 3 std::regex_traits<CharT>::length
NAME
std::regex_traits<CharT>::length - std::regex_traits<CharT>::length
Synopsis
static std::size_t length(const char_type* p);
Calculates the length of a null-terminated character sequence, that is, the smallest i such that p[i]==0.
Standard library specializations of std::regex_traits execute std::char_traits<CharT>::length(p);
Parameters
p - pointer to the first element of the null-terminated character sequence
Return value
The length of the null-terminated character string.
Example
// Run this code
#include <regex>
#include <iostream>
int main()
{
std::cout << std::regex_traits<char>::length(u8"Кошка") << '\n'
<< std::regex_traits<wchar_t>::length(L"Кошка") << '\n';
}
Output:
10
5
Pages related to std::regex_traits<CharT>::length
- std::regex_traits<CharT>::lookup_classname (3) - std::regex_traits<CharT>::lookup_classname
- std::regex_traits<CharT>::lookup_collatename (3) - std::regex_traits<CharT>::lookup_collatename
- std::regex_traits<CharT>::getloc (3) - std::regex_traits<CharT>::getloc
- std::regex_traits<CharT>::imbue (3) - std::regex_traits<CharT>::imbue
- std::regex_traits<CharT>::isctype (3) - std::regex_traits<CharT>::isctype
- std::regex_traits<CharT>::regex_traits (3) - std::regex_traits<CharT>::regex_traits
- std::regex_traits<CharT>::transform (3) - std::regex_traits<CharT>::transform
- std::regex_traits<CharT>::transform_primary (3) - std::regex_traits<CharT>::transform_primary
- std::regex_traits<CharT>::translate (3) - std::regex_traits<CharT>::translate
- std::regex_traits<CharT>::translate_nocase (3) - std::regex_traits<CharT>::translate_nocase
- std::regex_traits<CharT>::value (3) - std::regex_traits<CharT>::value
- std::regex_traits (3) - std::regex_traits
- std::regex_token_iterator (3) - std::regex_token_iterator
- std::regex_token_iterator<BidirIt,CharT,Traits>::operator*,operator-> (3) - std::regex_token_iterator<BidirIt,CharT,Traits>::operator*,operator->
- std::regex_token_iterator<BidirIt,CharT,Traits>::operator++,operator++(int) (3) - std::regex_token_iterator<BidirIt,CharT,Traits>::operator++,operator++(int)
- std::regex_token_iterator<BidirIt,CharT,Traits>::operator= (3) - std::regex_token_iterator<BidirIt,CharT,Traits>::operator=