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

AK: Generalize AK::String::to_int() for more types

This commit is contained in:
Sahan Fernando 2020-12-11 00:17:30 +11:00 committed by Andreas Kling
parent 39364bdda4
commit 37df4bbd90
8 changed files with 93 additions and 24 deletions

View file

@ -114,8 +114,10 @@ public:
bool matches(const StringView& mask, CaseSensitivity = CaseSensitivity::CaseInsensitive) const;
bool matches(const StringView& mask, Vector<MaskSpan>&, CaseSensitivity = CaseSensitivity::CaseInsensitive) const;
Optional<int> to_int() const;
Optional<unsigned> to_uint() const;
template<typename T = int>
Optional<T> to_int() const;
template<typename T = unsigned>
Optional<T> to_uint() const;
String to_lowercase() const;
String to_uppercase() const;