Go to the source code of this file.
bool s_to_i32_unsafe |
( |
const char * |
s, |
|
|
const char * |
s_end, |
|
|
int32_t & |
number |
|
) |
| |
Definition at line 25 of file s_to_n32_unsafe.cc.
31 for (; s != s_end; ++s)
35 if (i < std::numeric_limits<int32_t>::min())
43 for (; s != s_end; ++s)
47 if (i > std::numeric_limits<int32_t>::max())
53 number =
static_cast<int32_t
> (i);
bool s_to_u32_unsafe |
( |
const char * |
s, |
|
|
const char * |
s_end, |
|
|
uint32_t & |
number |
|
) |
| |
Definition at line 7 of file s_to_n32_unsafe.cc.
10 for (; s != s_end; ++s)
13 u +=
static_cast<uint32_t
> (*s) - 0x30;
14 if (u >= std::numeric_limits<uint32_t>::max())
19 number =
static_cast<uint32_t
> (u);