std::regex_traits::length
Aus cppreference.com
< cpp | regex | regex traits
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
static std::size_t length(const char_type* p); |
||
Berechnet die Länge eines Null-terminierte Zeichenfolge, das heißt, die kleinste
i
so dass 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.
You can help to correct and verify the translation. Click here for instructions.
Standard-Bibliothek Spezialisierungen std::regex_traits std::char_traits<CharT>::length(p); auszuführen. ...
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.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Parameter
p | - | Zeiger auf das erste Element des null-terminierte Zeichenfolge
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. |
[Bearbeiten] Rückgabewert
Die Länge des null-terminierte Zeichenkette .
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.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Beispiel
#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