Namensräume
Varianten
Aktionen

Strings library

Aus cppreference.com
< cpp


 
 
Strings Bibliothek
Null-terminierte Strings
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Byte-Strings
Multibyte-Strings
Wide Strings
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_string
char_traits
 
Die C + +-Strings Bibliothek bietet Unterstützung für zwei allgemeine Arten von Strings:
Original:
The C++ strings library includes support for two general types of strings:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • std::basic_string - eine Template-Klasse entwickelt, um Strings beliebiger Charakter-Typ zu manipulieren .
    Original:
    std::basic_string - a templated class designed to manipulate strings of any character type.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Null-terminierte Strings - Arrays von Zeichen durch ein spezielles null Zeichen abgeschlossen .
    Original:
    Null-terminated strings - arrays of characters terminated by a special null character.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] std::basic_string

Die Vorlagen Klasse std::basic_string verallgemeinert, wie Sequenzen von Zeichen manipuliert und gespeichert. String Erstellung, Manipulation und Zerstörung sind alle von einer günstigen Satz von Methoden der Klasse und verwandte Funktionen gehandhabt .
Original:
The templated class std::basic_string generalizes how sequences of characters are manipulated and stored. String creation, manipulation, and destruction are all handled by a convenient set of class methods and related functions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Mehrere Spezialisierungen std::basic_string sind für häufig verwendete Typen zur Verfügung:
Original:
Several specializations of std::basic_string are provided for commonly-used types:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Defined in header <string>
Type
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
std::string std::basic_string<char>
std::wstring std::basic_string<wchar_t>
std::u16string std::basic_string<char16_t>
std::u32string std::basic_string<char32_t>

[Bearbeiten] Null-terminierte Strings

Null-terminierte Strings sind Arrays von Zeichen, die durch eine spezielle null Zeichen abgeschlossen werden. C + + bietet Funktionen zum Erstellen, Überprüfen und ändern null-terminierten Strings .
Original:
Null-terminated strings are arrays of characters that are terminated by a special null character. C++ provides functions to create, inspect, and modify null-terminated strings.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Es gibt drei Arten von Null-terminierte Strings:
Original:
There are three types of null-terminated strings:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Zusätzliche Unterstützung

[Bearbeiten] char_traits

Die String-Bibliothek bietet auch Klassen-Template char_traits, die Typen und Funktionen definiert für std::basic_string. Die folgenden Spezialisierungen sind definiert:
Original:
The string library also provides class template char_traits that defines types and functions for std::basic_string. The following specializations are defined:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Defined in header <string>
template<> class char_traits<std::string>;

template<> class char_traits<std::wstring>;
template<> class char_traits<std::u16string>;

template<> class char_traits<std::u32string>;


(seit C++11)
(seit C++11)