tmp/tmpa26qoaz_/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
*Throws:* `out_of_range` if `pos > str.size()`.
|
| 18 |
+
|
| 19 |
+
*Effects:* Determines the effective length `rlen` of the string to
|
| 20 |
+
append as the smaller of `n` and `str``.size() - ``pos` and calls
|
| 21 |
+
`append(str.data() + pos, rlen)`.
|
| 22 |
+
|
| 23 |
+
*Returns:* `*this`.
|
| 24 |
+
|
| 25 |
+
``` cpp
|
| 26 |
+
basic_string& append(basic_string_view<charT, traits> sv);
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
*Effects:* Equivalent to: `return append(sv.data(), sv.size());`
|
| 30 |
+
|
| 31 |
+
``` cpp
|
| 32 |
+
template<class T>
|
| 33 |
+
basic_string& append(const T& t, size_type pos, size_type n = npos);
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
*Throws:* `out_of_range` if `pos > sv.size()`.
|
| 37 |
+
|
| 38 |
+
*Effects:* Creates a variable, `sv`, as if by
|
| 39 |
+
`basic_string_view<charT, traits> sv = t`. Determines the effective
|
| 40 |
+
length `rlen` of the string to append as the smaller of `n` and
|
| 41 |
+
`sv.size() - pos` and calls `append(sv.data() + pos, rlen)`.
|
| 42 |
+
|
| 43 |
+
*Remarks:* This function shall not participate in overload resolution
|
| 44 |
+
unless `is_convertible_v<const T&, basic_string_view<charT, traits>>` is
|
| 45 |
+
`true` and `is_convertible_v<const T&, const charT*>` is `false`.
|
| 46 |
+
|
| 47 |
+
*Returns:* `*this`.
|
| 48 |
+
|
| 49 |
+
``` cpp
|
| 50 |
+
basic_string&
|
| 51 |
+
append(const charT* s, size_type n);
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
*Requires:* `s` points to an array of at least `n` elements of `charT`.
|
| 55 |
+
|
| 56 |
+
*Throws:* `length_error` if `size() + n > max_size()`.
|
| 57 |
+
|
| 58 |
+
*Effects:* The function replaces the string controlled by `*this` with a
|
| 59 |
+
string of length `size() + n` whose first `size()` elements are a copy
|
| 60 |
+
of the original string controlled by `*this` and whose remaining
|
| 61 |
+
elements are a copy of the initial `n` elements of `s`.
|
| 62 |
+
|
| 63 |
+
*Returns:* `*this`.
|
| 64 |
+
|
| 65 |
+
``` cpp
|
| 66 |
+
basic_string& append(const charT* s);
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
*Requires:* `s` points to an array of at least `traits::length(s) + 1`
|
| 70 |
+
elements of `charT`.
|
| 71 |
+
|
| 72 |
+
*Effects:* Calls `append(s, traits::length(s))`.
|
| 73 |
+
|
| 74 |
+
*Returns:* `*this`.
|
| 75 |
+
|
| 76 |
+
``` cpp
|
| 77 |
+
basic_string& append(size_type n, charT c);
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
*Effects:* Equivalent to `append(basic_string(n, c))`.
|
| 81 |
+
|
| 82 |
+
*Returns:* `*this`.
|
| 83 |
+
|
| 84 |
+
``` cpp
|
| 85 |
+
template<class InputIterator>
|
| 86 |
+
basic_string& append(InputIterator first, InputIterator last);
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
*Requires:* \[`first`, `last`) is a valid range.
|
| 90 |
+
|
| 91 |
+
*Effects:* Equivalent to
|
| 92 |
+
`append(basic_string(first, last, get_allocator()))`.
|
| 93 |
+
|
| 94 |
+
*Returns:* `*this`.
|
| 95 |
+
|
| 96 |
+
``` cpp
|
| 97 |
+
basic_string& append(initializer_list<charT> il);
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
*Effects:* Calls `append(il.begin(), il.size())`.
|
| 101 |
+
|
| 102 |
+
*Returns:* `*this`.
|
| 103 |
+
|
| 104 |
+
``` cpp
|
| 105 |
+
void push_back(charT c);
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
*Effects:* Equivalent to `append(static_cast<size_type>(1), c)`.
|
| 109 |
+
|