mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:24:58 +00:00
AK: Add case-insensitive hashing for the new String classes
Bringing over this functionality from DeprecatedString.
This commit is contained in:
parent
545d8336b8
commit
1e820385d9
4 changed files with 22 additions and 0 deletions
|
@ -100,6 +100,11 @@ unsigned FlyString::hash() const
|
|||
return String::fly_string_data_to_hash({}, m_data);
|
||||
}
|
||||
|
||||
u32 FlyString::ascii_case_insensitive_hash() const
|
||||
{
|
||||
return case_insensitive_string_hash(reinterpret_cast<char const*>(bytes().data()), bytes().size());
|
||||
}
|
||||
|
||||
FlyString::operator String() const
|
||||
{
|
||||
return to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue