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:
parent
39364bdda4
commit
37df4bbd90
8 changed files with 93 additions and 24 deletions
|
@ -111,8 +111,10 @@ public:
|
|||
// following newline.".
|
||||
Vector<StringView> lines(bool consider_cr = true) 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;
|
||||
|
||||
// Create a new substring view of this string view, starting either at the beginning of
|
||||
// the given substring view, or after its end, and continuing until the end of this string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue