mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00:00
AK: Move to_int(), to_uint() implementations to StringUtils (#1338)
Provide wrappers in String and StringView. Add some tests for the implementations.
This commit is contained in:
parent
918ebabf60
commit
d75fa80a7b
7 changed files with 141 additions and 73 deletions
|
@ -77,9 +77,8 @@ public:
|
|||
// following newline.".
|
||||
Vector<StringView> lines(bool consider_cr = true) const;
|
||||
|
||||
// FIXME: These should be shared between String and StringView somehow!
|
||||
unsigned to_uint(bool& ok) const;
|
||||
int to_int(bool& ok) const;
|
||||
unsigned to_uint(bool& ok) 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