From Jason Turner

[string.find]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpzbllu61t/{from.md → to.md} +44 -0
tmp/tmpzbllu61t/{from.md → to.md} RENAMED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##### `basic_string::find` <a id="string.find">[[string.find]]</a>
2
+
3
+ ``` cpp
4
+ size_type find(basic_string_view<charT, traits> sv, size_type pos = 0) const noexcept;
5
+ ```
6
+
7
+ *Effects:* Determines the lowest position `xpos`, if possible, such that
8
+ both of the following conditions hold:
9
+
10
+ - `pos <= xpos` and `xpos + sv.size() <= size()`;
11
+ - `traits::eq(at(xpos + I), sv.at(I))` for all elements `I` of the data
12
+ referenced by `sv`.
13
+
14
+ *Returns:* `xpos` if the function can determine such a value for `xpos`.
15
+ Otherwise, returns `npos`.
16
+
17
+ ``` cpp
18
+ size_type find(const basic_string& str, size_type pos = 0) const noexcept;
19
+ ```
20
+
21
+ *Effects:* Equivalent to:
22
+ `return find(basic_string_view<charT, traits>(str), pos);`
23
+
24
+ ``` cpp
25
+ size_type find(const charT* s, size_type pos, size_type n) const;
26
+ ```
27
+
28
+ *Returns:* `find(basic_string_view<charT, traits>(s, n), pos)`.
29
+
30
+ ``` cpp
31
+ size_type find(const charT* s, size_type pos = 0) const;
32
+ ```
33
+
34
+ *Requires:* `s` points to an array of at least `traits::length(s) + 1`
35
+ elements of `charT`.
36
+
37
+ *Returns:* `find(basic_string_view<charT, traits>(s), pos)`.
38
+
39
+ ``` cpp
40
+ size_type find(charT c, size_type pos = 0) const;
41
+ ```
42
+
43
+ *Returns:* `find(basic_string(1, c), pos)`.
44
+