mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
AK: Make String::matches() capable of reporting match positions too
Also, rewrite StringUtils::match(), because the old implementation was fairly broken, e.g. "acdcxb" would *not* match "a*?b".
This commit is contained in:
parent
2d6d1ca67f
commit
0801b1fada
7 changed files with 86 additions and 33 deletions
|
@ -112,6 +112,7 @@ public:
|
|||
|
||||
static String repeated(char, size_t count);
|
||||
bool matches(const StringView& mask, CaseSensitivity = CaseSensitivity::CaseInsensitive) const;
|
||||
bool matches(const StringView& mask, Vector<MaskSpan>&, CaseSensitivity = CaseSensitivity::CaseInsensitive) const;
|
||||
|
||||
Optional<int> to_int() const;
|
||||
Optional<unsigned> to_uint() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue