rapidyaml  0.7.0
parse and emit YAML, and do it fast
atox: generic chars to value

Dispatches to the most appropriate and efficient conversion function. More...

Functions

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 >
bool ::type c4::atox (csubstr buf, T *v) noexcept
 
template<class T >
bool c4::atox (csubstr s, T **v) noexcept
 

Detailed Description

Dispatches to the most appropriate and efficient conversion function.

Function Documentation

◆ atox() [1/12]

bool c4::atox ( csubstr  s,
uint8_t *  v 
)
inlinenoexcept

Definition at line 2288 of file charconv.hpp.

2288 { return atou(s, v); }
bool atou(csubstr str, T *v) noexcept
Convert a trimmed string to an unsigned integral value.
Definition: charconv.hpp:1548

References c4::atou().

Referenced by c4::from_chars().

◆ atox() [2/12]

bool c4::atox ( csubstr  s,
uint16_t *  v 
)
inlinenoexcept

Definition at line 2289 of file charconv.hpp.

2289 { return atou(s, v); }

References c4::atou().

◆ atox() [3/12]

bool c4::atox ( csubstr  s,
uint32_t *  v 
)
inlinenoexcept

Definition at line 2290 of file charconv.hpp.

2290 { return atou(s, v); }

References c4::atou().

◆ atox() [4/12]

bool c4::atox ( csubstr  s,
uint64_t *  v 
)
inlinenoexcept

Definition at line 2291 of file charconv.hpp.

2291 { return atou(s, v); }

References c4::atou().

◆ atox() [5/12]

bool c4::atox ( csubstr  s,
int8_t *  v 
)
inlinenoexcept

Definition at line 2292 of file charconv.hpp.

2292 { return atoi(s, v); }
bool atoi(csubstr str, T *v) noexcept
Convert a trimmed string to a signed integral value.
Definition: charconv.hpp:1455

References c4::atoi().

◆ atox() [6/12]

bool c4::atox ( csubstr  s,
int16_t *  v 
)
inlinenoexcept

Definition at line 2293 of file charconv.hpp.

2293 { return atoi(s, v); }

References c4::atoi().

◆ atox() [7/12]

bool c4::atox ( csubstr  s,
int32_t *  v 
)
inlinenoexcept

Definition at line 2294 of file charconv.hpp.

2294 { return atoi(s, v); }

References c4::atoi().

◆ atox() [8/12]

bool c4::atox ( csubstr  s,
int64_t *  v 
)
inlinenoexcept

Definition at line 2295 of file charconv.hpp.

2295 { return atoi(s, v); }

References c4::atoi().

◆ atox() [9/12]

bool c4::atox ( csubstr  s,
float *  v 
)
inlinenoexcept

Definition at line 2296 of file charconv.hpp.

2296 { return atof(s, v); }
bool atof(csubstr str, float *v) noexcept
Convert a string to a single precision real number.
Definition: charconv.hpp:2111

References c4::atof().

◆ atox() [10/12]

bool c4::atox ( csubstr  s,
double *  v 
)
inlinenoexcept

Definition at line 2297 of file charconv.hpp.

2297 { return atod(s, v); }
bool atod(csubstr str, double *v) noexcept
Convert a string to a double precision real number.
Definition: charconv.hpp:2172

References c4::atod().

◆ atox() [11/12]

template<class T >
bool ::type c4::atox ( csubstr  buf,
T *  v 
)
noexcept

Definition at line 2299 of file charconv.hpp.

2299 { return atoi(buf, v); }

◆ atox() [12/12]

template<class T >
bool c4::atox ( csubstr  s,
T **  v 
)
inlinenoexcept

Definition at line 2302 of file charconv.hpp.

2302 { intptr_t tmp; bool ret = atox(s, &tmp); if(ret) { *v = (T*)tmp; } return ret; }
bool atox(csubstr s, T **v) noexcept
Definition: charconv.hpp:2302