mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:34:57 +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
|
@ -439,6 +439,11 @@ u32 String::hash() const
|
|||
return m_data->hash();
|
||||
}
|
||||
|
||||
u32 String::ascii_case_insensitive_hash() const
|
||||
{
|
||||
return case_insensitive_string_hash(reinterpret_cast<char const*>(bytes().data()), bytes().size());
|
||||
}
|
||||
|
||||
Utf8View String::code_points() const
|
||||
{
|
||||
return Utf8View(bytes_as_string_view());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue