| Home | Libraries | People | FAQ | More

###### string::assign (2 of 7 overloads)

Assign characters to a string.

<h7> Synopsis </h7>

    string&
    assign(
        string const& other);

<h7> Description </h7>

Replace the contents with a copy of `other`.

<h7> Complexity </h7>

Linear in `other.size()`.

<h7> Exception Safety </h7>

Strong guarantee. Calls to `memory_resource::allocate` may throw.

<h7> Return Value </h7>

`*this`

<h7> Parameters </h7>

Name | Description
--- | ---
`other` | The string to use as a source to copy from.