rapidyaml  0.16.0
parseandemitYAML,anddoitfast
xtoa: generic value to chars

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

Functions

size_t c4::xtoa (substr s, uint8_t v) noexcept
 
size_t c4::xtoa (substr s, uint16_t v) noexcept
 
size_t c4::xtoa (substr s, uint32_t v) noexcept
 
size_t c4::xtoa (substr s, uint64_t v) noexcept
 
size_t c4::xtoa (substr s, int8_t v) noexcept
 
size_t c4::xtoa (substr s, int16_t v) noexcept
 
size_t c4::xtoa (substr s, int32_t v) noexcept
 
size_t c4::xtoa (substr s, int64_t v) noexcept
 
size_t c4::xtoa (substr s, float v) noexcept
 
size_t c4::xtoa (substr s, double v) noexcept
 
size_t c4::xtoa (substr s, uint8_t v, uint8_t radix) noexcept
 
size_t c4::xtoa (substr s, uint16_t v, uint16_t radix) noexcept
 
size_t c4::xtoa (substr s, uint32_t v, uint32_t radix) noexcept
 
size_t c4::xtoa (substr s, uint64_t v, uint64_t radix) noexcept
 
size_t c4::xtoa (substr s, int8_t v, int8_t radix) noexcept
 
size_t c4::xtoa (substr s, int16_t v, int16_t radix) noexcept
 
size_t c4::xtoa (substr s, int32_t v, int32_t radix) noexcept
 
size_t c4::xtoa (substr s, int64_t v, int64_t radix) noexcept
 
size_t c4::xtoa (substr s, uint8_t v, uint8_t radix, size_t num_digits) noexcept
 
size_t c4::xtoa (substr s, uint16_t v, uint16_t radix, size_t num_digits) noexcept
 
size_t c4::xtoa (substr s, uint32_t v, uint32_t radix, size_t num_digits) noexcept
 
size_t c4::xtoa (substr s, uint64_t v, uint64_t radix, size_t num_digits) noexcept
 
size_t c4::xtoa (substr s, int8_t v, int8_t radix, size_t num_digits) noexcept
 
size_t c4::xtoa (substr s, int16_t v, int16_t radix, size_t num_digits) noexcept
 
size_t c4::xtoa (substr s, int32_t v, int32_t radix, size_t num_digits) noexcept
 
size_t c4::xtoa (substr s, int64_t v, int64_t radix, size_t num_digits) noexcept
 
size_t c4::xtoa (substr s, float v, int precision, RealFormat_e formatting=FTOA_FLEX) noexcept
 
size_t c4::xtoa (substr s, double v, int precision, RealFormat_e formatting=FTOA_FLEX) noexcept
 
template<class T >
auto c4::xtoa (substr buf, T v) noexcept-> size_t::type
 
template<class T >
size_t c4::xtoa (substr s, T *v) noexcept
 

Detailed Description

Dispatches to the most appropriate and efficient conversion function.

Function Documentation

size_t c4::xtoa ( substr  s,
uint8_t  v 
)
inlinenoexcept

Definition at line 2256 of file charconv.hpp.

2256 { return write_dec(s, v); }
size_t write_dec(substr buf, T val, size_t num_digits) noexcept
same as c4::write_dec(), but pad with zeroes on the left such that the resulting string is num_digits...
Definition: charconv.hpp:812
size_t c4::xtoa ( substr  s,
uint16_t  v 
)
inlinenoexcept

Definition at line 2257 of file charconv.hpp.

2257 { return write_dec(s, v); }
size_t write_dec(substr buf, T val, size_t num_digits) noexcept
same as c4::write_dec(), but pad with zeroes on the left such that the resulting string is num_digits...
Definition: charconv.hpp:812
size_t c4::xtoa ( substr  s,
uint32_t  v 
)
inlinenoexcept

Definition at line 2258 of file charconv.hpp.

2258 { return write_dec(s, v); }
size_t write_dec(substr buf, T val, size_t num_digits) noexcept
same as c4::write_dec(), but pad with zeroes on the left such that the resulting string is num_digits...
Definition: charconv.hpp:812
size_t c4::xtoa ( substr  s,
uint64_t  v 
)
inlinenoexcept

Definition at line 2259 of file charconv.hpp.

2259 { return write_dec(s, v); }
size_t write_dec(substr buf, T val, size_t num_digits) noexcept
same as c4::write_dec(), but pad with zeroes on the left such that the resulting string is num_digits...
Definition: charconv.hpp:812
size_t c4::xtoa ( substr  s,
int8_t  v 
)
inlinenoexcept

Definition at line 2260 of file charconv.hpp.

2260 { return itoa(s, v); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
int16_t  v 
)
inlinenoexcept

Definition at line 2261 of file charconv.hpp.

2261 { return itoa(s, v); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
int32_t  v 
)
inlinenoexcept

Definition at line 2262 of file charconv.hpp.

2262 { return itoa(s, v); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
int64_t  v 
)
inlinenoexcept

Definition at line 2263 of file charconv.hpp.

2263 { return itoa(s, v); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
float  v 
)
inlinenoexcept

Definition at line 2264 of file charconv.hpp.

2264 { return ftoa(s, v); }
size_t ftoa(substr str, float v, int precision=-1, RealFormat_e formatting=FTOA_FLEX) noexcept
Convert a single-precision real number to string.
Definition: charconv.hpp:2071
size_t c4::xtoa ( substr  s,
double  v 
)
inlinenoexcept

Definition at line 2265 of file charconv.hpp.

2265 { return dtoa(s, v); }
size_t dtoa(substr str, double v, int precision=-1, RealFormat_e formatting=FTOA_FLEX) noexcept
Convert a double-precision real number to string.
Definition: charconv.hpp:2097
size_t c4::xtoa ( substr  s,
uint8_t  v,
uint8_t  radix 
)
inlinenoexcept

Definition at line 2267 of file charconv.hpp.

2267 { return utoa(s, v, radix); }
size_t utoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::utoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1385
size_t c4::xtoa ( substr  s,
uint16_t  v,
uint16_t  radix 
)
inlinenoexcept

Definition at line 2268 of file charconv.hpp.

2268 { return utoa(s, v, radix); }
size_t utoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::utoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1385
size_t c4::xtoa ( substr  s,
uint32_t  v,
uint32_t  radix 
)
inlinenoexcept

Definition at line 2269 of file charconv.hpp.

2269 { return utoa(s, v, radix); }
size_t utoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::utoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1385
size_t c4::xtoa ( substr  s,
uint64_t  v,
uint64_t  radix 
)
inlinenoexcept

Definition at line 2270 of file charconv.hpp.

2270 { return utoa(s, v, radix); }
size_t utoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::utoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1385
size_t c4::xtoa ( substr  s,
int8_t  v,
int8_t  radix 
)
inlinenoexcept

Definition at line 2271 of file charconv.hpp.

2271 { return itoa(s, v, radix); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
int16_t  v,
int16_t  radix 
)
inlinenoexcept

Definition at line 2272 of file charconv.hpp.

2272 { return itoa(s, v, radix); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
int32_t  v,
int32_t  radix 
)
inlinenoexcept

Definition at line 2273 of file charconv.hpp.

2273 { return itoa(s, v, radix); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
int64_t  v,
int64_t  radix 
)
inlinenoexcept

Definition at line 2274 of file charconv.hpp.

2274 { return itoa(s, v, radix); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
uint8_t  v,
uint8_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2276 of file charconv.hpp.

2276 { return utoa(s, v, radix, num_digits); }
size_t utoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::utoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1385
size_t c4::xtoa ( substr  s,
uint16_t  v,
uint16_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2277 of file charconv.hpp.

2277 { return utoa(s, v, radix, num_digits); }
size_t utoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::utoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1385
size_t c4::xtoa ( substr  s,
uint32_t  v,
uint32_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2278 of file charconv.hpp.

2278 { return utoa(s, v, radix, num_digits); }
size_t utoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::utoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1385
size_t c4::xtoa ( substr  s,
uint64_t  v,
uint64_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2279 of file charconv.hpp.

2279 { return utoa(s, v, radix, num_digits); }
size_t utoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::utoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1385
size_t c4::xtoa ( substr  s,
int8_t  v,
int8_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2280 of file charconv.hpp.

2280 { return itoa(s, v, radix, num_digits); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
int16_t  v,
int16_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2281 of file charconv.hpp.

2281 { return itoa(s, v, radix, num_digits); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
int32_t  v,
int32_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2282 of file charconv.hpp.

2282 { return itoa(s, v, radix, num_digits); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
int64_t  v,
int64_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2283 of file charconv.hpp.

2283 { return itoa(s, v, radix, num_digits); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
size_t c4::xtoa ( substr  s,
float  v,
int  precision,
RealFormat_e  formatting = FTOA_FLEX 
)
inlinenoexcept

Definition at line 2285 of file charconv.hpp.

2285 { return ftoa(s, v, precision, formatting); }
size_t ftoa(substr str, float v, int precision=-1, RealFormat_e formatting=FTOA_FLEX) noexcept
Convert a single-precision real number to string.
Definition: charconv.hpp:2071
size_t c4::xtoa ( substr  s,
double  v,
int  precision,
RealFormat_e  formatting = FTOA_FLEX 
)
inlinenoexcept

Definition at line 2286 of file charconv.hpp.

2286 { return dtoa(s, v, precision, formatting); }
size_t dtoa(substr str, double v, int precision=-1, RealFormat_e formatting=FTOA_FLEX) noexcept
Convert a double-precision real number to string.
Definition: charconv.hpp:2097
template<class T >
auto c4::xtoa ( substr  buf,
T  v 
) -> size_t ::type
inlinenoexcept

Definition at line 2288 of file charconv.hpp.

2288 { return itoa(buf, v); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229
template<class T >
size_t c4::xtoa ( substr  s,
T *  v 
)
inlinenoexcept

Definition at line 2291 of file charconv.hpp.

2291 { return itoa(s, (intptr_t)v, (intptr_t)16); }
size_t itoa(substr buf, T v, T radix, size_t num_digits) noexcept
same as c4::itoa(), but pad with zeroes on the left such that the resulting string is num_digits wide...
Definition: charconv.hpp:1229