#include "third_party/liburlpattern/pattern.h"
#include <optional>
#include <string_view>
#include "third_party/abseil-cpp/absl/base/macros.h"
#include "third_party/abseil-cpp/absl/strings/str_format.h"
#include "third_party/icu/source/common/unicode/utf8.h"
#include "third_party/liburlpattern/utils.h"
namespace liburlpattern {
namespace {
void AppendModifier(Modifier modifier, std::string& append_target) { … }
size_t ModifierLength(Modifier modifier) { … }
}
std::ostream& operator<<(std::ostream& o, Part part) { … }
Part::Part(PartType t, std::string v, Modifier m)
: … { … }
Part::Part(PartType t,
std::string n,
std::string p,
std::string v,
std::string s,
Modifier m)
: … { … }
bool Part::HasCustomName() const { … }
Pattern::Pattern(std::vector<Part> part_list,
Options options,
std::string segment_wildcard_regex)
: … { … }
std::string Pattern::GeneratePatternString() const { … }
std::string Pattern::GenerateRegexString(
std::vector<std::string>* name_list_out) const { … }
bool Pattern::HasRegexGroups() const { … }
bool Pattern::CanDirectMatch() const { … }
bool Pattern::DirectMatch(
std::string_view input,
std::vector<
std::pair<std::string_view, std::optional<std::string_view>>>*
group_list_out) const { … }
size_t Pattern::RegexStringLength() const { … }
void Pattern::AppendDelimiterList(std::string& append_target) const { … }
size_t Pattern::DelimiterListLength() const { … }
void Pattern::AppendEndsWith(std::string& append_target) const { … }
size_t Pattern::EndsWithLength() const { … }
bool Pattern::IsOnlyFullWildcard() const { … }
bool Pattern::IsOnlyFixedText() const { … }
}