1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:17:35 +00:00

AK: Move String::hash() and String::String() to StringBase

This commit is contained in:
Dan Klishch 2023-10-28 15:47:59 -04:00 committed by Andrew Kaster
parent 1b09a1851e
commit d6290c4684
4 changed files with 16 additions and 16 deletions

View file

@ -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>