diff --git a/AK/ByteString.h b/AK/ByteString.h index f10732fc0ba..f8967f2aecf 100644 --- a/AK/ByteString.h +++ b/AK/ByteString.h @@ -119,6 +119,12 @@ public: [[nodiscard]] Optional to_float(TrimWhitespace = TrimWhitespace::Yes) const; #endif + template + Optional to_number(TrimWhitespace trim_whitespace = TrimWhitespace::Yes) const + { + return view().to_number(trim_whitespace); + } + [[nodiscard]] ByteString to_lowercase() const; [[nodiscard]] ByteString to_uppercase() const; [[nodiscard]] ByteString to_snakecase() const;