std::basic_string::operator=
De cppreference.com
[] |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody> basic_string& operator=( const basic_string& str ); |
(1) | |
basic_string& operator=( basic_string&& str ); |
(2) | (depuis C++11) |
basic_string& operator=( const CharT* s ); |
(3) | |
basic_string& operator=( CharT ch ); |
(4) | |
basic_string& operator=( std::initializer_list<CharT> ilist ); |
(5) | (depuis C++11) |
Remplace le contenu de la chane .
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)
Remplace le contenu d'une copie de
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)
Remplace le contenu avec ceux de
str en utilisant la smantique de dplacement. str est dans un tat indfini aprs l'opration .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)
Remplace le contenu avec ceux de la chane de caractres termine par NULL point par
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)
Remplace le contenu de
ch caractreOriginal:
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)
Remplace le contenu avec ceux de la liste d'initialisation
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.
Paramtres
| ch | - | pour initialiser la valeur de la chane de caractres avec
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 | - | Chane tre utilis comme source pour initialiser la chane avec
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 | - | pointeur vers un nul termanated chane de caractres
to utilisation comme source d'initialiser la chane avec 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 | - | initialiseur pour initialiser la liste avec la chane
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. |
Retourne la valeur
*this
Complexit
1)
linaire de la taille des
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)
constant. Si
alloc est donn et alloc != other.get_allocator(), alors linaire .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)
linaire de la taille des
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)
linaire de la taille des
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.
Exemple
| This section is incomplete Reason: no example |
Voir aussi
construit un basic_string Original: constructs a basic_string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique) | |
attribuer une chane de caractres Original: assign characters to a string The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique) | |