mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
committed by
Andreas Kling
parent
2d6d1ca67f
commit
0801b1fada
@@ -164,6 +164,11 @@ bool StringView::ends_with(const StringView& str, CaseSensitivity case_sensitivi
|
||||
return StringUtils::ends_with(*this, str, case_sensitivity);
|
||||
}
|
||||
|
||||
bool StringView::matches(const StringView& mask, Vector<MaskSpan>& mask_spans, CaseSensitivity case_sensitivity) const
|
||||
{
|
||||
return StringUtils::matches(*this, mask, case_sensitivity, &mask_spans);
|
||||
}
|
||||
|
||||
bool StringView::matches(const StringView& mask, CaseSensitivity case_sensitivity) const
|
||||
{
|
||||
return StringUtils::matches(*this, mask, case_sensitivity);
|
||||
|
||||
Reference in New Issue
Block a user