From Jason Turner

[range.lazy.split.overview]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmppn7j5jcb/{from.md → to.md} +25 -0
tmp/tmppn7j5jcb/{from.md → to.md} RENAMED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Overview <a id="range.lazy.split.overview">[[range.lazy.split.overview]]</a>
2
+
3
+ `lazy_split_view` takes a view and a delimiter, and splits the view into
4
+ subranges on the delimiter. The delimiter can be a single element or a
5
+ view of elements.
6
+
7
+ The name `views::lazy_split` denotes a range adaptor object
8
+ [[range.adaptor.object]]. Given subexpressions `E` and `F`, the
9
+ expression `views::lazy_split(E, F)` is expression-equivalent to
10
+ `lazy_split_view(E, F)`.
11
+
12
+ [*Example 1*:
13
+
14
+ ``` cpp
15
+ string str{"the quick brown fox"};
16
+ for (auto word : str | views::lazy_split(' ')) {
17
+ for (char ch : word)
18
+ cout << ch;
19
+ cout << '*';
20
+ }
21
+ // The above prints the*quick*brown*fox*
22
+ ```
23
+
24
+ — *end example*]
25
+