Espaços nominais
Variantes
Ações

std::wcsrtombs

De cppreference.com

<metanoindex/>

 
 
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.
 
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.
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.
 
<tbody> </tbody>
Definido no cabeçalho <cwchar>
std::size_t wcsrtombs( char* dst, const wchar_t** src, std::size_t len, std::mbstate_t* ps );
Converte uma seqüência de caracteres de largura a partir da matriz cujo primeiro elemento é apontado por *src em sua representação multibyte estreita que começa no estado de conversão descrito por *ps. Se dst não é nulo, os caracteres convertidos são armazenados nos elementos sucessivos da matriz de char apontado por dst. Não mais do que len bytes são escritos para a matriz destino.
Original:
Converts a sequence of wide characters from the array whose first element is pointed to by *src to its narrow multibyte representation that begins in the conversion state described by *ps. If dst is not null, converted characters are stored in the successive elements of the char array pointed to by dst. No more than len bytes are written to the destination array.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Cada personagem é convertido como se por uma chamada para std::wcrtomb. A conversão pára se:
Original:
Each character is converted as if by a call to std::wcrtomb. The conversion stops if:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • O caractere nulo foi convertido e armazenado. src está definido para NULL e *ps representa o estado deslocamento inicial.
    Original:
    The null character was converted and stored. src is set to NULL and *ps represents the 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.
  • A wchar_t se que não corresponde a um caractere válido na localidade C atual. src está definido para apontar para o caráter não convertido primeira gama.
    Original:
    A wchar_t was found that does not correspond to a valid character in the current C locale. src is set to point at the first unconverted wide character.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • o caráter de multibyte próximo a ser armazenado exceder len. src está definido para apontar para o caráter não convertido primeiro de largura. Esta condição não é verificado se dst==NULL.
    Original:
    the next multibyte character to be stored would exceed len. src is set to point at the first unconverted wide character. This condition is not checked if dst==NULL.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

Parâmetros

dst -
ponteiro para matriz de caracteres estreita onde os caracteres multibyte será armazenado
Original:
pointer to narrow character array where the multibyte characters will be stored
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
src -
ponteiro para ponteiro para o primeiro elemento de uma string terminada em nulo de largura
Original:
pointer to pointer to the first element of a null-terminated wide string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
len -
número de bytes disponíveis na matriz apontada por dst