From Jason Turner

[string.copy]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpv4iwavz4/{from.md → to.md} +3 -10
tmp/tmpv4iwavz4/{from.md → to.md} RENAMED
@@ -1,19 +1,12 @@
1
  ##### `basic_string::copy` <a id="string.copy">[[string.copy]]</a>
2
 
3
  ``` cpp
4
- size_type copy(charT* s, size_type n, size_type pos = 0) const;
5
  ```
6
 
7
- Let `rlen` be the smaller of `n` and `size() - pos`.
8
-
9
- *Throws:* `out_of_range` if `pos > size()`.
10
-
11
- *Requires:* \[`s`, `s + rlen`) is a valid range.
12
-
13
- *Effects:* Equivalent to: `traits::copy(s, data() + pos, rlen)`.
14
 
15
  [*Note 1*: This does not terminate `s` with a null
16
  object. — *end note*]
17
 
18
- *Returns:* `rlen`.
19
-
 
1
  ##### `basic_string::copy` <a id="string.copy">[[string.copy]]</a>
2
 
3
  ``` cpp
4
+ constexpr size_type copy(charT* s, size_type n, size_type pos = 0) const;
5
  ```
6
 
7
+ *Effects:* Equivalent to:
8
+ `return basic_string_view<charT, traits>(*this).copy(s, n, pos);`
 
 
 
 
 
9
 
10
  [*Note 1*: This does not terminate `s` with a null
11
  object. — *end note*]
12