Espaços nominais
Variantes
Acções

Strings library

Da cppreference.com
< cpp


 
 
Biblioteca cordas
Strings terminadas
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.
Cadeias de bytes
Multibyte cordas
Cordas de largura
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
 
A biblioteca C + + cordas inclui suporte para dois tipos gerais de 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 - uma classe de modelo projetado para manipular strings de qualquer tipo de personagem.
    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.
  • Strings terminadas - matrizes de caracteres terminadas por um caractere especial' nulo.
    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.

Índice

[editar] std::basic_string

O std::basic_string classe templated generaliza como sequências de caracteres são manipulados e armazenados. Criação String, manipulação e destruição são todos tratados por um conjunto conveniente de métodos de classe e funções relacionadas.
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.
Especializações diversas std::basic_string são fornecidos para os tipos mais usados:
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>
Tipo
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>

[editar] Strings terminadas

Strings terminadas são matrizes de caracteres que são terminadas por um caractere especial' nulo. C + + fornece funções para criar, inspecionar e modificar strings terminadas.
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.
Existem três tipos de strings terminadas:
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.

[editar] Suporte adicional

[editar] char_traits

A biblioteca também oferece corda char_traits classe de modelo que define os tipos e funções para std::basic_string. Os seguintes especializações são definidas:
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>;


(a partir do C++ 11)
(a partir do C++ 11)