31[[nodiscard]]
auto check_glob_pattern_impl_asterisk(
34 for (std::size_t size = 0; size < str.size(); ++size) {
45 std::size_t pattern_index = 0;
46 std::size_t str_index = 0;
48 if (pattern_index >= pattern.size()) {
49 return str_index == str.size();
52 if (pattern.at(pattern_index) ==
'*') {
53 return check_glob_pattern_impl_asterisk(
54 pattern.substr(pattern_index), str.substr(str_index));
57 if (str_index >= str.size()) {
61 if (pattern.at(pattern_index) != str.at(str_index)) {
Declaration of check_glob_pattern function.
Class of view of strings.
auto substr(std::size_t pos) const -> StringView
Get a part of the string.
Namespace of utility functions and classes.
auto check_glob_pattern(StringView pattern, StringView str) -> bool
Check whether a string matches with a glob pattern.
Namespace of stat_bench source codes.
Declaration of check_glob_pattern function.