39 template <
typename FindPolicy>
42 FindPolicy find_policy) {
51 found_pos = find_policy.Find(text, delimiter, pos);
54 find_policy.Length(delimiter));
61 struct LiteralPolicy {
63 return text.
find(delimiter, pos);
92 return text.
substr(found_pos, 1);
94 return GenericFind(text,
delimiter_, pos, LiteralPolicy());
102 size_t found_pos = text.
find(c_, pos);
105 return text.
substr(found_pos, 1);
115 return GenericFind(text,
delimiters_, pos, AnyOfPolicy());
127 pos = std::min(pos, text.
size());
131 if (substr.length() <=
static_cast<size_t>(
length_))
constexpr size_t Find(Needle, Needle, Ts...)
string_view substr(size_type pos, size_type n=npos) const
ByAnyChar(absl::string_view sp)
absl::string_view Find(absl::string_view text, size_t pos) const
size_type find(string_view s, size_type pos=0) const noexcept
const std::string delimiter_
static constexpr size_type npos
ByLength(ptrdiff_t length)
constexpr size_type size() const noexcept
#define ABSL_RAW_CHECK(condition, message)
absl::string_view Find(absl::string_view text, size_t pos) const
constexpr bool empty() const noexcept
absl::string_view Find(absl::string_view text, size_t pos) const
constexpr size_type length() const noexcept
absl::string_view Find(absl::string_view text, size_t pos) const
const std::string delimiters_
constexpr const_pointer data() const noexcept
size_type find_first_of(string_view s, size_type pos=0) const noexcept
ByString(absl::string_view sp)