tmp/tmpze68grfs/{from.md → to.md}
RENAMED
|
@@ -1,16 +1,15 @@
|
|
| 1 |
#### `basic_string::substr` <a id="string::substr">[[string::substr]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
-
basic_string
|
| 5 |
-
substr(size_type pos = 0, size_type n = npos) const;
|
| 6 |
```
|
| 7 |
|
| 8 |
*Requires:* `pos <= size()`
|
| 9 |
|
| 10 |
*Throws:* `out_of_range` if `pos > size()`.
|
| 11 |
|
| 12 |
*Effects:* Determines the effective length `rlen` of the string to copy
|
| 13 |
as the smaller of `n` and `size() - pos`.
|
| 14 |
|
| 15 |
-
*Returns:* `basic_string
|
| 16 |
|
|
|
|
| 1 |
#### `basic_string::substr` <a id="string::substr">[[string::substr]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
basic_string substr(size_type pos = 0, size_type n = npos) const;
|
|
|
|
| 5 |
```
|
| 6 |
|
| 7 |
*Requires:* `pos <= size()`
|
| 8 |
|
| 9 |
*Throws:* `out_of_range` if `pos > size()`.
|
| 10 |
|
| 11 |
*Effects:* Determines the effective length `rlen` of the string to copy
|
| 12 |
as the smaller of `n` and `size() - pos`.
|
| 13 |
|
| 14 |
+
*Returns:* `basic_string(data()+pos,rlen)`.
|
| 15 |
|