Espaços nominais
Variantes
Acções

Null-terminated multibyte strings

Da cppreference.com
< cpp‎ | string

 
 
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
 
Strings terminadas multibyte
Wide / multibyte conversões
Original:
Wide/multibyte conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
mbsinit
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
mbstate_t
 
Uma seqüência multibyte terminada em nulo (NTMBS), ou "string multibyte", é uma seqüência de bytes diferentes de zero seguido por um byte com o valor zero (o caractere nulo de terminação).
Original:
A null-terminated multibyte string (NTMBS), or "multibyte string", is a sequence of nonzero bytes followed by a byte with value zero (the terminating null character).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Cada personagem armazenada na string pode ocupar mais de um byte. A codificação usada para representar caracteres em uma seqüência de caracteres multibyte localidade específica: pode ser UTF-8, GB18030, EUC-JP, Shift-JIS, etc Por exemplo, a matriz de char {'\xe4','\xbd','\xa0','\xe5','\xa5','\xbd','\0'} é um NTMBS segurando a corda "你好" na codificação UTF-8 multibyte: os três primeiros bytes codificar o 你 personagem, nos próximos três bytes codificar o 好 personagem. A mesma cadeia codificada em GB18030 é o {'\xc4', '\xe3', '\xba', '\xc3', '\0' matriz de char}, onde cada um dos dois personagens é codificado como uma sequência de dois bytes.
Original:
Each character stored in the string may occupy more than one byte. The encoding used to represent characters in a multibyte character string is locale-specific: it may be UTF-8, GB18030, EUC-JP, Shift-JIS, etc. For example, the char array {'\xe4','\xbd','\xa0','\xe5','\xa5','\xbd','\0'} is an NTMBS holding the string "你好" in UTF-8 multibyte encoding: the first three bytes encode the character 你, the next three bytes encode the character 好. The same string encoded in GB18030 is the char array {'\xc4', '\xe3', '\xba', '\xc3', '\0'}, where each of the two characters is encoded as a two-byte sequence.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Em algumas codificações multibyte, qualquer sequência de caracteres multibyte dado pode representar caracteres diferentes, dependendo das seqüências de bytes anteriores, conhecidos como "seqüências de turnos". Tais codificações são conhecidos como dependente do estado: conhecimento do estado atual mudança é necessária para interpretar cada personagem. Um NTMBS só é válido se ele começa e termina no estado deslocamento inicial: se uma sequência mudança foi usado, a seqüência unshift correspondente tem de estar presente antes do caractere nulo de terminação. Exemplos de tais codificações são as JIS 7 bits, BOCU-1 e SCSU.
Original:
In some multibyte encodings, any given multibyte character sequence may represent different characters depending on the previous byte sequences, known as "shift sequences". Such encodings are known as state-dependent: knowledge of the current shift state is required to interpret each character. An NTMBS is only valid if it begins and ends in the initial shift state: if a shift sequence was used, the corresponding unshift sequence has to be present before the terminating null character. Examples of such encodings are the 7-bit JIS, BOCU-1 and SCSU.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Uma cadeia de caracteres multibyte layout compatível com terminação nula seqüência de bytes (BNP), isto é, podem ser armazenados, copiados e analisados ​​utilizando as mesmas instalações, exceto para o cálculo do número de caracteres. Se o local correto é, com efeito, I / O funciona também lidar com cordas de vários bytes. Cadeias de bytes múltiplos pode ser convertido para e a partir de cordas de largura, utilizando as funções std::codecvt membros, std::wstring_convert, ou as seguintes funções de conversão dependente de localidade:
Original:
A multibyte character string is layout-compatible with null-terminated byte string (NTBS), that is, can be stored, copied, and examined using the same facilities, except for calculating the number of characters. If the correct locale is in effect, I/O functions also handle multibyte strings. Multibyte strings can be converted to and from wide strings using the std::codecvt member functions, std::wstring_convert, or the following locale-dependent conversion functions:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Multibyte / conversões de caracteres

Defined in header <cstdlib>
retorna o número de bytes no caractere multibyte seguinte
Original:
returns the number of bytes in the next multibyte character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
converte o caractere multibyte ao lado de caracteres largos
Original:
converts the next multibyte character to wide character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
converte um caractere largo em sua representação multibyte
Original:
converts a wide character to its multibyte representation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
converte uma cadeia de caracteres multibyte estreita para string de largura
Original:
converts a narrow multibyte character string to wide string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
converte uma cadeia de largura para estreitar cadeia de caracteres multibyte
Original:
converts a wide string to narrow multibyte character string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
Defined in header <cwchar>
Verifica se o objeto mbstate_t representa o estado deslocamento inicial
Original:
checks if the mbstate_t object represents initial shift state
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
alarga um caractere de byte único estreita ao caráter amplo, se possível
Original:
widens a single-byte narrow character to wide character, if possible
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
restringe um caráter amplo para um caractere de byte único estreita, se possível
Original:
narrows a wide character to a single-byte narrow character, if possible
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
retorna o número de bytes no caractere multibyte seguinte, determinado estado
Original:
returns the number of bytes in the next multibyte character, given state
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
converte o caractere multibyte ao lado de caráter amplo, determinado estado
Original:
converts the next multibyte character to wide character, given state
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
converte um caractere largo em sua representação multibyte, determinado estado
Original:
converts a wide character to its multibyte representation, given state
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
converte uma cadeia de caracteres multibyte estreita para string de largura, determinado estado
Original:
converts a narrow multibyte character string to wide string, given state
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
converte uma cadeia ampla de cadeia de caracteres multibyte estreita, dado estado
Original:
converts a wide string to narrow multibyte character string, given state
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
Defined in header <cuchar>
(C++11)
gerar o caractere de 16 bits de largura próximo de uma string multibyte estreito
Original:
generate the next 16-bit wide character from a narrow multibyte string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
(C++11)
converte um caractere de 16 bits de largura para estreitar string multibyte
Original:
convert a 16-bit wide character to narrow multibyte string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
(C++11)
gerar o personagem de 32 bits de largura próximo de uma string multibyte estreito
Original:
generate the next 32-bit wide character from a narrow multibyte string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
(C++11)
converte um caractere de 32 bits de largura para estreitar string multibyte
Original:
convert a 32-bit wide character to narrow multibyte string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]

[editar] Tipos

Defined in header <cwchar>
informação de conversão de estado necessário para repetir seqüências de caracteres multibyte
Original:
conversion state information necessary to iterate multibyte character strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe) [edit]

[editar] Macros

Defined in header <climits>
MB_LEN_MAX
número máximo de bytes em um caractere multibyte
Original:
maximum number of bytes in a multibyte character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(macro constante) [edit]
Defined in header <cstdlib>
MB_CUR_MAX
número máximo de bytes em um caractere multibyte na atual C locale
(variável macro)
Original:
maximum number of bytes in a multibyte character in the current C locale
(variável macro)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
Defined in header <cuchar>
__STDC_UTF_16__
indica que a codificação UTF-16 é usada por mbrtoc16 e c16rtomb
Original:
indicates that UTF-16 encoding is used by mbrtoc16 and c16rtomb
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(macro constante)
__STDC_UTF_32__
indica que a codificação UTF-32 é usada por mbrtoc32 e c32rtomb
Original:
indicates that UTF-32 encoding is used by mbrtoc32 and c32rtomb
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(macro constante)