summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authordemostanis <demostanis@protonmail.com>2022-09-10 18:14:52 +0200
committerLinus Groh <mail@linusgroh.de>2022-10-14 13:37:29 +0200
commitaa788581f2db9dc38ec022f9744bf5c7d214c50e (patch)
tree3708084a1c07733c4a8463bae204c2a3636ae0b4 /AK
parent70f4d943beb1210cea915237bc0a2128fdf9a7fe (diff)
downloadserenity-aa788581f2db9dc38ec022f9744bf5c7d214c50e.zip
AK: Make StringUtils::matches() handle escaping
Diffstat (limited to 'AK')
-rw-r--r--AK/StringUtils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/AK/StringUtils.cpp b/AK/StringUtils.cpp
index e283df0ce3..70c09fe008 100644
--- a/AK/StringUtils.cpp
+++ b/AK/StringUtils.cpp
@@ -59,6 +59,9 @@ bool matches(StringView str, StringView mask, CaseSensitivity case_sensitivity,
case '?':
record_span(string_ptr - string_start, 1);
break;
+ case '\\':
+ ++mask_ptr;
+ break;
default:
auto p = *mask_ptr;
auto ch = *string_ptr;