mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
AK: Add case insensitive String::ends_with support
FileSystemPath::has_extension was jumping through hoops and allocating memory to do a case insensitive comparison needlessly. Extend the existing String::ends_with method to allow the caller to specify the case sensitivity required.
This commit is contained in:
parent
8e4b858b3f
commit
332f96e7ca
7 changed files with 53 additions and 12 deletions
|
@ -43,8 +43,7 @@ int convert_to_int(const StringView&, bool& ok);
|
|||
unsigned convert_to_uint(const StringView&, bool& ok);
|
||||
unsigned convert_to_uint_from_hex(const StringView&, bool& ok);
|
||||
bool equals_ignoring_case(const StringView&, const StringView&);
|
||||
bool ends_with(const StringView& str, const StringView& end);
|
||||
|
||||
bool ends_with(const StringView& a, const StringView& b, CaseSensitivity);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue