mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
AK: Generalize AK::String::to_int() for more types
This commit is contained in:
parent
39364bdda4
commit
37df4bbd90
Notes:
sideshowbarker
2024-07-19 00:43:10 +09:00
Author: https://github.com/ccapitalK
Commit: 37df4bbd90
Pull-request: https://github.com/SerenityOS/serenity/pull/4459
Issue: https://github.com/SerenityOS/serenity/issues/4377
8 changed files with 93 additions and 24 deletions
|
@ -82,7 +82,10 @@ public:
|
|||
|
||||
FlyString to_lowercase() const;
|
||||
|
||||
Optional<int> to_int() const;
|
||||
template<typename T = int>
|
||||
Optional<T> to_int() const;
|
||||
template<typename T = unsigned>
|
||||
Optional<T> to_uint() const;
|
||||
|
||||
bool equals_ignoring_case(const StringView&) const;
|
||||
bool starts_with(const StringView&, CaseSensitivity = CaseSensitivity::CaseSensitive) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue