mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-27 11:48:59 +00:00
AK: Move String::hash() and String::String() to StringBase
This commit is contained in:
parent
1b09a1851e
commit
d6290c4684
Notes:
sideshowbarker
2024-07-16 23:52:22 +09:00
Author: https://github.com/DanShaders
Commit: d6290c4684
Pull-request: https://github.com/SerenityOS/serenity/pull/21661
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/kleinesfilmroellchen
Reviewed-by: https://github.com/trflynn89
4 changed files with 16 additions and 16 deletions
|
@ -48,12 +48,6 @@ public:
|
|||
|
||||
using StringBase::StringBase;
|
||||
|
||||
// Creates an empty (zero-length) String.
|
||||
constexpr String()
|
||||
: StringBase(ShortString { SHORT_STRING_FLAG, {} })
|
||||
{
|
||||
}
|
||||
|
||||
// Creates a new String from a sequence of UTF-8 encoded code points.
|
||||
static ErrorOr<String> from_utf8(StringView);
|
||||
template<typename T>
|
||||
|
@ -153,7 +147,6 @@ public:
|
|||
[[nodiscard]] bool contains(StringView, CaseSensitivity = CaseSensitivity::CaseSensitive) const;
|
||||
[[nodiscard]] bool contains(u32, CaseSensitivity = CaseSensitivity::CaseSensitive) const;
|
||||
|
||||
[[nodiscard]] u32 hash() const;
|
||||
[[nodiscard]] u32 ascii_case_insensitive_hash() const;
|
||||
|
||||
template<Arithmetic T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue