25
Ranges library
[ranges]
25.7
Range adaptors
[range.adaptors]
25.7.16
Lazy split view
[range.lazy.split]
25.7.16.1
Overview
[range.lazy.split.overview]
1
#
lazy_
split_
view
takes a view and a delimiter, and splits the view into subranges on the delimiter
.
The delimiter can be a single element or a view of elements
.
2
#
The name
views
::
lazy_
split
denotes a range adaptor object (
[range.
adaptor.
object]
)
.
Given subexpressions
E
and
F
, the expression
views
::
lazy_
split
(
E, F
)
is expression-equivalent to
lazy_
split_
view
(
E, F
)
.
3
#
[
Example
1
:
string str
{
"the quick brown fox"
}
;
for
(
auto
word
:
str
|
views
::
lazy_split
(
' '
)
)
{
for
(
char
ch
:
word
)
cout
<
<
ch; cout
<
<
'*'
;
}
// The above prints
the*quick*brown*fox*
—
end example
]