Dispatches to the most appropriate and efficient conversion function.
More...
|
| bool | c4::atox (csubstr s, uint8_t *v) noexcept |
| |
| bool | c4::atox (csubstr s, uint16_t *v) noexcept |
| |
| bool | c4::atox (csubstr s, uint32_t *v) noexcept |
| |
| bool | c4::atox (csubstr s, uint64_t *v) noexcept |
| |
| bool | c4::atox (csubstr s, int8_t *v) noexcept |
| |
| bool | c4::atox (csubstr s, int16_t *v) noexcept |
| |
| bool | c4::atox (csubstr s, int32_t *v) noexcept |
| |
| bool | c4::atox (csubstr s, int64_t *v) noexcept |
| |
| bool | c4::atox (csubstr s, float *v) noexcept |
| |
| bool | c4::atox (csubstr s, double *v) noexcept |
| |
| template<class T > |
| auto | c4::atox (csubstr buf, T *v) noexcept -> bool ::type |
| |
| template<class T > |
| bool | c4::atox (csubstr s, T **v) noexcept |
| |
Dispatches to the most appropriate and efficient conversion function.
◆ atox() [1/12]
| bool c4::atox |
( |
csubstr |
s, |
|
|
uint8_t * |
v |
|
) |
| |
|
inlinenoexcept |
Definition at line 2291 of file charconv.hpp.
2291 {
return atou(s, v); }
bool atou(csubstr str, T *v) noexcept
Convert a trimmed string to an unsigned integral value.
References c4::atou().
◆ atox() [2/12]
| bool c4::atox |
( |
csubstr |
s, |
|
|
uint16_t * |
v |
|
) |
| |
|
inlinenoexcept |
◆ atox() [3/12]
| bool c4::atox |
( |
csubstr |
s, |
|
|
uint32_t * |
v |
|
) |
| |
|
inlinenoexcept |
◆ atox() [4/12]
| bool c4::atox |
( |
csubstr |
s, |
|
|
uint64_t * |
v |
|
) |
| |
|
inlinenoexcept |
◆ atox() [5/12]
| bool c4::atox |
( |
csubstr |
s, |
|
|
int8_t * |
v |
|
) |
| |
|
inlinenoexcept |
Definition at line 2295 of file charconv.hpp.
2295 {
return atoi(s, v); }
bool atoi(csubstr str, T *v) noexcept
Convert a trimmed string to a signed integral value.
References c4::atoi().
◆ atox() [6/12]
| bool c4::atox |
( |
csubstr |
s, |
|
|
int16_t * |
v |
|
) |
| |
|
inlinenoexcept |
◆ atox() [7/12]
| bool c4::atox |
( |
csubstr |
s, |
|
|
int32_t * |
v |
|
) |
| |
|
inlinenoexcept |
◆ atox() [8/12]
| bool c4::atox |
( |
csubstr |
s, |
|
|
int64_t * |
v |
|
) |
| |
|
inlinenoexcept |
◆ atox() [9/12]
| bool c4::atox |
( |
csubstr |
s, |
|
|
float * |
v |
|
) |
| |
|
inlinenoexcept |
Definition at line 2299 of file charconv.hpp.
2299 {
return atof(s, v); }
bool atof(csubstr str, float *v) noexcept
Convert a string to a single precision real number.
References c4::atof().
◆ atox() [10/12]
| bool c4::atox |
( |
csubstr |
s, |
|
|
double * |
v |
|
) |
| |
|
inlinenoexcept |
Definition at line 2300 of file charconv.hpp.
2300 {
return atod(s, v); }
bool atod(csubstr str, double *v) noexcept
Convert a string to a double precision real number.
References c4::atod().
◆ atox() [11/12]
template<class T >
| auto c4::atox |
( |
csubstr |
buf, |
|
|
T * |
v |
|
) |
| -> bool ::type |
|
inlinenoexcept |
◆ atox() [12/12]
template<class T >
| bool c4::atox |
( |
csubstr |
s, |
|
|
T ** |
v |
|
) |
| |
|
inlinenoexcept |
Definition at line 2305 of file charconv.hpp.
2305 { intptr_t tmp;
bool ret =
atox(s, &tmp);
if(ret) { *v = (T*)tmp; }
return ret; }
bool atox(csubstr s, T **v) noexcept