Espaços nominais
Variantes
Acções

std::regex_traits::length

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

 
 
Biblioteca de expressões regulares
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.
(C++11)
Algoritmos
Original:
Algorithms
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iteradores
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Exceções
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Características
Original:
Traits
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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.
(C++11)
 
 
static std::size_t length(const char_type* p);
Calcula o comprimento de uma seqüência de caracteres terminada por nulo, ou seja, a menor i tal que 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.
especializações biblioteca padrão de std::regex_traits executar 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.

[editar] Parâmetros

p -
ponteiro. ao primeiro elemento da seqüência de caracteres terminada com null
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.

[editar] Valor de retorno

O comprimento da cadeia de caracteres terminada em nulo.
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.

[editar] Exemplo

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

Saída:

10
5