util/NumberParser: add overload with StringView
This commit is contained in:
@@ -35,6 +35,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct StringView;
|
||||
|
||||
static inline unsigned
|
||||
ParseUnsigned(const char *p, char **endptr=nullptr, int base=10) noexcept
|
||||
{
|
||||
@@ -67,6 +69,9 @@ ParseInt64(const char *p, char **endptr=nullptr, int base=10) noexcept
|
||||
return strtoll(p, endptr, base);
|
||||
}
|
||||
|
||||
int64_t
|
||||
ParseInt64(StringView s, const char **endptr_r=nullptr, int base=10) noexcept;
|
||||
|
||||
static inline double
|
||||
ParseDouble(const char *p, char **endptr=nullptr) noexcept
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user