diff options
author | demostanis <demostanis@protonmail.com> | 2022-09-10 18:14:52 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-10-14 13:37:29 +0200 |
commit | aa788581f2db9dc38ec022f9744bf5c7d214c50e (patch) | |
tree | 3708084a1c07733c4a8463bae204c2a3636ae0b4 /AK/StringUtils.cpp | |
parent | 70f4d943beb1210cea915237bc0a2128fdf9a7fe (diff) | |
download | serenity-aa788581f2db9dc38ec022f9744bf5c7d214c50e.zip |
AK: Make StringUtils::matches() handle escaping
Diffstat (limited to 'AK/StringUtils.cpp')
-rw-r--r-- | AK/StringUtils.cpp | 3 |
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; |