rapidyaml 0.14.0
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
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>
auto c4::atox (csubstr buf, T *v) noexcept -> bool::type
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 2301 of file charconv.hpp.

2301{ return atou(s, v); }
bool atou(csubstr str, T *v) noexcept
Convert a trimmed string to an unsigned integral value.

◆ atox() [2/12]

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

Definition at line 2302 of file charconv.hpp.

2302{ return atou(s, v); }

◆ atox() [3/12]

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

Definition at line 2303 of file charconv.hpp.

2303{ return atou(s, v); }

◆ atox() [4/12]

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

Definition at line 2304 of file charconv.hpp.

2304{ return atou(s, v); }

◆ atox() [5/12]

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

Definition at line 2305 of file charconv.hpp.

2305{ return atoi(s, v); }
bool atoi(csubstr str, T *v) noexcept
Convert a trimmed string to a signed integral value.

◆ atox() [6/12]

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

Definition at line 2306 of file charconv.hpp.

2306{ return atoi(s, v); }

◆ atox() [7/12]

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

Definition at line 2307 of file charconv.hpp.

2307{ return atoi(s, v); }

◆ atox() [8/12]

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

Definition at line 2308 of file charconv.hpp.

2308{ return atoi(s, v); }

◆ atox() [9/12]

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

Definition at line 2309 of file charconv.hpp.

2309{ return atof(s, v); }
bool atof(csubstr str, float *v) noexcept
Convert a string to a single precision real number.

◆ atox() [10/12]

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

Definition at line 2310 of file charconv.hpp.

2310{ return atod(s, v); }
bool atod(csubstr str, double *v) noexcept
Convert a string to a double precision real number.

◆ atox() [11/12]

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

Definition at line 2312 of file charconv.hpp.

2312{ return atoi(buf, v); }

◆ atox() [12/12]

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

Definition at line 2315 of file charconv.hpp.

2315{ intptr_t tmp; bool ret = atox(s, &tmp); if(ret) { *v = (T*)tmp; } return ret; }
bool atox(csubstr s, uint8_t *v) noexcept