mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Add DeprecatedFlyString::to_number<T>
This commit is contained in:
parent
159eda5c6d
commit
a4ecc65398
Notes:
sideshowbarker
2024-07-17 10:31:19 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/a4ecc65398 Pull-request: https://github.com/SerenityOS/serenity/pull/22400
1 changed files with 6 additions and 0 deletions
|
@ -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