tmp/tmp3o6ejlbn/{from.md → to.md}
RENAMED
|
@@ -1,86 +0,0 @@
|
|
| 1 |
-
#### `basic_string::append` <a id="string::append">[[string::append]]</a>
|
| 2 |
-
|
| 3 |
-
``` cpp
|
| 4 |
-
basic_string&
|
| 5 |
-
append(const basic_string& str);
|
| 6 |
-
```
|
| 7 |
-
|
| 8 |
-
*Effects:* Calls `append(str.data(), str.size())`.
|
| 9 |
-
|
| 10 |
-
*Returns:* `*this`.
|
| 11 |
-
|
| 12 |
-
``` cpp
|
| 13 |
-
basic_string&
|
| 14 |
-
append(const basic_string& str, size_type pos, size_type n = npos);
|
| 15 |
-
```
|
| 16 |
-
|
| 17 |
-
*Requires:* `pos <= str.size()`
|
| 18 |
-
|
| 19 |
-
*Throws:* `out_of_range` if `pos > str.size()`.
|
| 20 |
-
|
| 21 |
-
*Effects:* Determines the effective length `rlen` of the string to
|
| 22 |
-
append as the smaller of `n` and `str``.size() - ``pos` and calls
|
| 23 |
-
`append(str.data() + pos, rlen)`.
|
| 24 |
-
|
| 25 |
-
*Returns:* `*this`.
|
| 26 |
-
|
| 27 |
-
``` cpp
|
| 28 |
-
basic_string&
|
| 29 |
-
append(const charT* s, size_type n);
|
| 30 |
-
```
|
| 31 |
-
|
| 32 |
-
*Requires:* `s` points to an array of at least `n` elements of `charT`.
|
| 33 |
-
|
| 34 |
-
*Throws:* `length_error` if `size() + n > max_size()`.
|
| 35 |
-
|
| 36 |
-
*Effects:* The function replaces the string controlled by `*this` with a
|
| 37 |
-
string of length `size() + n` whose first `size()` elements are a copy
|
| 38 |
-
of the original string controlled by `*this` and whose remaining
|
| 39 |
-
elements are a copy of the initial `n` elements of `s`.
|
| 40 |
-
|
| 41 |
-
*Returns:* `*this`.
|
| 42 |
-
|
| 43 |
-
``` cpp
|
| 44 |
-
basic_string& append(const charT* s);
|
| 45 |
-
```
|
| 46 |
-
|
| 47 |
-
*Requires:* `s` points to an array of at least `traits::length(s) + 1`
|
| 48 |
-
elements of `charT`.
|
| 49 |
-
|
| 50 |
-
*Effects:* Calls `append(s, traits::length(s))`.
|
| 51 |
-
|
| 52 |
-
*Returns:* `*this`.
|
| 53 |
-
|
| 54 |
-
``` cpp
|
| 55 |
-
basic_string& append(size_type n, charT c);
|
| 56 |
-
```
|
| 57 |
-
|
| 58 |
-
*Effects:* Equivalent to `append(basic_string(n, c))`.
|
| 59 |
-
|
| 60 |
-
*Returns:* `*this`.
|
| 61 |
-
|
| 62 |
-
``` cpp
|
| 63 |
-
template<class InputIterator>
|
| 64 |
-
basic_string& append(InputIterator first, InputIterator last);
|
| 65 |
-
```
|
| 66 |
-
|
| 67 |
-
*Requires:* \[`first`, `last`) is a valid range.
|
| 68 |
-
|
| 69 |
-
*Effects:* Equivalent to `append(basic_string(first, last))`.
|
| 70 |
-
|
| 71 |
-
*Returns:* `*this`.
|
| 72 |
-
|
| 73 |
-
``` cpp
|
| 74 |
-
basic_string& append(initializer_list<charT> il);
|
| 75 |
-
```
|
| 76 |
-
|
| 77 |
-
*Effects:* Calls `append(il.begin(), il.size())`.
|
| 78 |
-
|
| 79 |
-
*Returns:* `*this`.
|
| 80 |
-
|
| 81 |
-
``` cpp
|
| 82 |
-
void push_back(charT c);
|
| 83 |
-
```
|
| 84 |
-
|
| 85 |
-
*Effects:* Equivalent to `append(static_cast<size_type>(1), c)`.
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|