std::basic_string::operator= - cppreference.com
De cppreference.com
<metanoindex/>
<tbody> </tbody>
|
|
(1) | |
|
|
(2) | (desde C++11) |
|
|
(3) | |
|
|
(4) | |
|
|
(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.
1)
Substitui o conteúdo com uma cópia do str
Original:
Replaces the contents with a copy of str
The text has been machine-translated via Google Translate.
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.
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.
4)
Substitui o conteúdo com ch personagem
Original:
Replaces the contents with character ch
The text has been machine-translated via Google Translate.
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.
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. |
| 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. |
| s | - | ponteiro para um personagem utilização cadeia nula-termanated Original: pointer to a null-termanated character string The text has been machine-translated via Google Translate. |
| 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. |
Valor de retorno
*this
Complexidade
1)
linear no tamanho de str
Original:
linear in size of str
The text has been machine-translated via Google Translate.
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.
3)
linear no tamanho de s
Original:
linear in size of s
The text has been machine-translated via Google Translate.
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.
5)
linear no tamanho de init
Original:
linear in size of init
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Exemplo
Veja também
constrói um Original: constructs a The text has been machine-translated via Google Translate. (função pública membro) [edit] | |
atribuir caracteres para uma string Original: assign characters to a string The text has been machine-translated via Google Translate. (função pública membro) [edit] | |