std::ranges::split_view<V,Pattern>::find_next
From cppreference.com
< cpp | ranges | split view
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Ranges library
(C++23)(C++23)
(C++26)(C++26)
(C++23)(C++23)
(C++26)(C++26)
(C++26)(C++26)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)
(C++23)(C++23)
(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
constexpr ranges::subrange <ranges::iterator_t <V>>
/*find_next*/( ranges::iterator_t <V> it );
(exposition only*)
/*find_next*/( ranges::iterator_t <V> it );
Searches for the next occurrence of pattern in the underlying view. Equivalent to:
auto [b, e] = ranges::search (ranges::subrange (it, ranges::end (base_
)),
pattern_
);
if (b != ranges::end (base_
) and ranges::empty (pattern_
))
{
++b;
++e;
}
return {b, e};
[edit] Parameters
it
-
an iterator to the position at which to start the search
[edit] Return value
A subrange that represents the next position of the pattern, if it was found. An empty subrange otherwise.