AK: Add ByteString::must_from_utf8(StringView) for Jakt

This commit is contained in:
Andreas Kling 2023-12-18 12:41:25 +01:00
parent 5b62d877f2
commit b27a62488c

View file

@ -90,6 +90,7 @@ public:
static ErrorOr<ByteString> from_utf8(ReadonlyBytes);
static ErrorOr<ByteString> from_utf8(StringView string) { return from_utf8(string.bytes()); }
static ByteString must_from_utf8(StringView string) { return MUST(from_utf8(string)); }
[[nodiscard]] static ByteString repeated(char, size_t count);
[[nodiscard]] static ByteString repeated(StringView, size_t count);