mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
AK: Move the wildcard-matching implementation to StringUtils
Provide wrappers in the String and StringView classes, and add some tests.
This commit is contained in:
parent
2a30a020c1
commit
055344f346
16 changed files with 147 additions and 62 deletions
20
AK/StringUtils.h
Normal file
20
AK/StringUtils.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Forward.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
enum class CaseSensitivity {
|
||||
CaseInsensitive,
|
||||
CaseSensitive,
|
||||
};
|
||||
|
||||
namespace StringUtils {
|
||||
|
||||
bool matches(const StringView& str, const StringView& mask, CaseSensitivity = CaseSensitivity::CaseInsensitive);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
using AK::CaseSensitivity;
|
Loading…
Add table
Add a link
Reference in a new issue