std::basic_string::operator=
De cppreference.com
<metanoindex/>
<tbody> </tbody> basic_string& operator=( const basic_string& str ); |
(1) | |
basic_string& operator=( basic_string&& str ); |
(2) | (desde C++11) |
basic_string& operator=( const CharT* s ); |
(3) | |
basic_string& operator=( CharT ch ); |
(4) | |
basic_string& operator=( std::initializer_list<CharT> ilist ); |
(5) | (desde C++11) |
Substitui o conteúdo da string.
Original:
Replaces the contents of the 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.
1)
Substitui o conteúdo com uma cópia do
strOriginal:
Replaces the contents with a copy of
strThe 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.
2)
Substitui o conteúdo com os de
str usando a semântica de movimento. str está em estado indefinido após a operação.Original:
Replaces the contents with those of
str using move semantics. str is in undefined state after the operation.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.
3)
Substitui o conteúdo com os de terminação nula cadeia de caracteres apontada por
s. Original:
Replaces the contents with those of null-terminated character string pointed to by
s. 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.
4)
Substitui o conteúdo com
ch personagemOriginal:
Replaces the contents with character
chThe 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.
8)
Substitui o conteúdo com os da lista de inicializador
ilist.Original:
Replaces the contents with those of the initializer list
ilist.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.
Parâmetros
| ch | - | valor para inicializar caracteres da string com
Original: value to initialize characters of the string with The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| str | - | cadeia a ser utilizado como fonte para iniciar a sequência com
Original: string to be used as source to initialize the string with The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| s | - | ponteiro para um personagem utilização cadeia nula-termanated
to como fonte para inicializar a string com Original: pointer to a null-termanated character string to use as source to initialize the string with The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| init | - | inicializador lista para inicializar a string com
Original: initializer list to initialize the string with The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Valor de retorno
*this
Complexidade
1)
linear no tamanho de
strOriginal:
linear in size of
strThe 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.
2)
constante. Se
alloc é dado e alloc != other.get_allocator(), em seguida, linear.Original:
constant. If
alloc is given and alloc != other.get_allocator(), then linear.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.
3)
linear no tamanho de
sOriginal:
linear in size of
sThe 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.
4)
constante.
Original:
constant.
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.
5)
linear no tamanho de
initOriginal:
linear in size of
initThe 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.
Exemplo
| Esta seção está incompleta Motivo: sem exemplo |
