mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:17: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
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/StringUtils.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
|
@ -65,6 +66,7 @@ public:
|
|||
bool ends_with(const StringView&) const;
|
||||
bool starts_with(char) const;
|
||||
bool ends_with(char) const;
|
||||
bool matches(const StringView& mask, CaseSensitivity = CaseSensitivity::CaseInsensitive) const;
|
||||
|
||||
StringView substring_view(size_t start, size_t length) const;
|
||||
Vector<StringView> split_view(char, bool keep_empty = false) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue