mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-02 22:24:26 +00:00
AK: Add DeprecatedFlyString::to_number<T>
This commit is contained in:
parent
159eda5c6d
commit
a4ecc65398
|
@ -69,6 +69,12 @@ public:
|
|||
|
||||
DeprecatedFlyString to_lowercase() const;
|
||||
|
||||
template<Arithmetic T>
|
||||
Optional<T> to_number(TrimWhitespace trim_whitespace = TrimWhitespace::Yes) const
|
||||
{
|
||||
return view().to_number<T>(trim_whitespace);
|
||||
}
|
||||
|
||||
template<typename T = int>
|
||||
Optional<T> to_int(TrimWhitespace = TrimWhitespace::Yes) const;
|
||||
template<typename T = unsigned>
|
||||
|
|
Loading…
Reference in a new issue