Espaces de noms
Variantes
Affichages
Actions

std::regex_traits::length

De cppreference.com
< cpp‎ | regex‎ | regex traits

 
 
Regular expressions bibliothèque
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_regex (C++11)
sub_match (C++11)
match_results (C++11)
Algorithmes
Original:
Algorithms
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_match (C++11)
regex_search (C++11)
regex_replace (C++11)
Les itérateurs
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_iterator (C++11)
regex_token_iterator (C++11)
Exceptions
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_error (C++11)
Traits
Original:
Traits
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
regex_traits (C++11)
Constantes
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
syntax_option_type (C++11)
match_flag_type (C++11)
error_type (C++11)
 
 
static std::size_t length(const char_type* p);
Calcule la longueur d'une séquence de caractères à zéro terminal, qui est, le plus petit de telle sorte que i p[i]==0 .
Original:
Calculates the length of a null-terminated character sequence, that is, the smallest i such that p[i]==0.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Spécialisations de la bibliothèque standard de std::regex_traits exécuter std::char_traits<CharT>::length(p);
Original:
Standard library specializations of std::regex_traits execute std::char_traits<CharT>::length(p);
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Paramètres

p -
pointeur vers le premier élément de la séquence de caractères à zéro terminal
Original:
pointer to the first element of the null-terminated character sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Retourne la valeur

La longueur de la chaîne de caractères terminée par NULL .
Original:
The length of the null-terminated character string.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Exemple

#include <regex>
#include <iostream>
 
int main()
{
    std::cout << std::regex_traits<char>::length(u8"Кошка") << '\n'
              << std::regex_traits<wchar_t>::length(L"Кошка") << '\n';
}

Résultat :

10
5