rapidyaml  0.12.1
parse and emit YAML, and do it fast
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

◆ xtoa() [1/30]

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

Definition at line 2245 of file charconv.hpp.

2245 { 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:799

References c4::write_dec().

◆ xtoa() [2/30]

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

Definition at line 2246 of file charconv.hpp.

2246 { return write_dec(s, v); }

References c4::write_dec().

◆ xtoa() [3/30]

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

Definition at line 2247 of file charconv.hpp.

2247 { return write_dec(s, v); }

References c4::write_dec().

◆ xtoa() [4/30]

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

Definition at line 2248 of file charconv.hpp.

2248 { return write_dec(s, v); }

References c4::write_dec().

◆ xtoa() [5/30]

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

Definition at line 2249 of file charconv.hpp.

2249 { 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:1216

References c4::itoa().

◆ xtoa() [6/30]

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

Definition at line 2250 of file charconv.hpp.

2250 { return itoa(s, v); }

References c4::itoa().

◆ xtoa() [7/30]

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

Definition at line 2251 of file charconv.hpp.

2251 { return itoa(s, v); }

References c4::itoa().

◆ xtoa() [8/30]

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

Definition at line 2252 of file charconv.hpp.

2252 { return itoa(s, v); }

References c4::itoa().

◆ xtoa() [9/30]

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

Definition at line 2253 of file charconv.hpp.

2253 { 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:2060

References c4::ftoa().

◆ xtoa() [10/30]

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

Definition at line 2254 of file charconv.hpp.

2254 { 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:2086

References c4::dtoa().

◆ xtoa() [11/30]

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

Definition at line 2256 of file charconv.hpp.

2256 { 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:1372

References c4::utoa().

◆ xtoa() [12/30]

size_t c4::xtoa ( substr  s,
uint16_t  v,
uint16_t  radix 
)
inlinenoexcept

Definition at line 2257 of file charconv.hpp.

2257 { return utoa(s, v, radix); }

References c4::utoa().

◆ xtoa() [13/30]

size_t c4::xtoa ( substr  s,
uint32_t  v,
uint32_t  radix 
)
inlinenoexcept

Definition at line 2258 of file charconv.hpp.

2258 { return utoa(s, v, radix); }

References c4::utoa().

◆ xtoa() [14/30]

size_t c4::xtoa ( substr  s,
uint64_t  v,
uint64_t  radix 
)
inlinenoexcept

Definition at line 2259 of file charconv.hpp.

2259 { return utoa(s, v, radix); }

References c4::utoa().

◆ xtoa() [15/30]

size_t c4::xtoa ( substr  s,
int8_t  v,
int8_t  radix 
)
inlinenoexcept

Definition at line 2260 of file charconv.hpp.

2260 { return itoa(s, v, radix); }

References c4::itoa().

◆ xtoa() [16/30]

size_t c4::xtoa ( substr  s,
int16_t  v,
int16_t  radix 
)
inlinenoexcept

Definition at line 2261 of file charconv.hpp.

2261 { return itoa(s, v, radix); }

References c4::itoa().

◆ xtoa() [17/30]

size_t c4::xtoa ( substr  s,
int32_t  v,
int32_t  radix 
)
inlinenoexcept

Definition at line 2262 of file charconv.hpp.

2262 { return itoa(s, v, radix); }

References c4::itoa().

◆ xtoa() [18/30]

size_t c4::xtoa ( substr  s,
int64_t  v,
int64_t  radix 
)
inlinenoexcept

Definition at line 2263 of file charconv.hpp.

2263 { return itoa(s, v, radix); }

References c4::itoa().

◆ xtoa() [19/30]

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

Definition at line 2265 of file charconv.hpp.

2265 { return utoa(s, v, radix, num_digits); }

References c4::utoa().

◆ xtoa() [20/30]

size_t c4::xtoa ( substr  s,
uint16_t  v,
uint16_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2266 of file charconv.hpp.

2266 { return utoa(s, v, radix, num_digits); }

References c4::utoa().

◆ xtoa() [21/30]

size_t c4::xtoa ( substr  s,
uint32_t  v,
uint32_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2267 of file charconv.hpp.

2267 { return utoa(s, v, radix, num_digits); }

References c4::utoa().

◆ xtoa() [22/30]

size_t c4::xtoa ( substr  s,
uint64_t  v,
uint64_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2268 of file charconv.hpp.

2268 { return utoa(s, v, radix, num_digits); }

References c4::utoa().

◆ xtoa() [23/30]

size_t c4::xtoa ( substr  s,
int8_t  v,
int8_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2269 of file charconv.hpp.

2269 { return itoa(s, v, radix, num_digits); }

References c4::itoa().

◆ xtoa() [24/30]

size_t c4::xtoa ( substr  s,
int16_t  v,
int16_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2270 of file charconv.hpp.

2270 { return itoa(s, v, radix, num_digits); }

References c4::itoa().

◆ xtoa() [25/30]

size_t c4::xtoa ( substr  s,
int32_t  v,
int32_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2271 of file charconv.hpp.

2271 { return itoa(s, v, radix, num_digits); }

References c4::itoa().

◆ xtoa() [26/30]

size_t c4::xtoa ( substr  s,
int64_t  v,
int64_t  radix,
size_t  num_digits 
)
inlinenoexcept

Definition at line 2272 of file charconv.hpp.

2272 { return itoa(s, v, radix, num_digits); }

References c4::itoa().

◆ xtoa() [27/30]

size_t c4::xtoa ( substr  s,
float  v,
int  precision,
RealFormat_e  formatting = FTOA_FLEX 
)
inlinenoexcept

Definition at line 2274 of file charconv.hpp.

2274 { return ftoa(s, v, precision, formatting); }

References c4::ftoa().

◆ xtoa() [28/30]

size_t c4::xtoa ( substr  s,
double  v,
int  precision,
RealFormat_e  formatting = FTOA_FLEX 
)
inlinenoexcept

Definition at line 2275 of file charconv.hpp.

2275 { return dtoa(s, v, precision, formatting); }

References c4::dtoa().

◆ xtoa() [29/30]

template<class T >
auto c4::xtoa ( substr  buf,
v 
) -> size_t ::type
inlinenoexcept

Definition at line 2277 of file charconv.hpp.

2277 { return itoa(buf, v); }

◆ xtoa() [30/30]

template<class T >
size_t c4::xtoa ( substr  s,
T *  v 
)
inlinenoexcept

Definition at line 2280 of file charconv.hpp.

2280 { return itoa(s, (intptr_t)v, (intptr_t)16); }

References c4::itoa().