21 #include "absl/memory/memory.h"
22 #include "absl/status/status.h"
23 #include "absl/strings/ascii.h"
24 #include "absl/strings/match.h"
25 #include "absl/strings/numbers.h"
26 #include "absl/strings/str_format.h"
36 bool case_sensitive) {
41 "Invalid regex string specified in matcher.");
51 :
type_(
type), string_matcher_(matcher), case_sensitive_(case_sensitive) {}
57 :
type_(other.
type_), case_sensitive_(other.case_sensitive_) {
77 :
type_(other.type_), case_sensitive_(other.case_sensitive_) {
78 if (
type_ == Type::kSafeRegex) {
79 regex_matcher_ =
std::move(other.regex_matcher_);
81 string_matcher_ =
std::move(other.string_matcher_);
87 if (
type_ == Type::kSafeRegex) {
88 regex_matcher_ =
std::move(other.regex_matcher_);
90 string_matcher_ =
std::move(other.string_matcher_);
92 case_sensitive_ = other.case_sensitive_;
161 if (
static_cast<int>(
type) < 5) {
174 "Invalid range specifier specified: end cannot be smaller than "
187 matcher_(
std::
move(string_matcher)),
188 invert_match_(invert_match) {}
194 range_start_(range_start),
196 invert_match_(invert_match) {}
202 present_match_(present_match),
203 invert_match_(invert_match) {}
208 invert_match_(other.invert_match_) {
243 invert_match_(other.invert_match_) {
246 range_start_ = other.range_start_;
247 range_end_ = other.range_end_;
250 present_match_ = other.present_match_;
260 invert_match_ = other.invert_match_;
263 range_start_ = other.range_start_;
264 range_end_ = other.range_end_;
267 present_match_ = other.present_match_;
295 }
else if (!
value.has_value()) {