|
rapidyaml
0.9.0
parse and emit YAML, and do it fast
|
Lightweight, very fast generic type-safe wrappers for converting individual values to/from strings. More...
Modules | |
| Get number of digits | |
| Write with known number of digits | |
| Writes a value without checking the buffer length with regards to the required number of digits to encode the value. | |
| Write a value | |
| Writes a value without checking the buffer length decimal number – but asserting. | |
| Read a value | |
| itoa: signed to chars | |
| utoa: unsigned to chars | |
| atoi: chars to signed | |
| atou: chars to unsigned | |
| overflows: does a number string overflow a type | |
| ftoa: float32 to chars | |
| dtoa: float64 to chars | |
| atof: chars to float32 | |
| atod: chars to float64 | |
| xtoa: generic value to chars | |
| Dispatches to the most appropriate and efficient conversion function. | |
| atox: generic chars to value | |
| Dispatches to the most appropriate and efficient conversion function. | |
| to_chars: generalized chars to value | |
| Convert the given value, writing into the string. | |
| from_chars: generalized chars to value | |
| Read a value from the string, which must be trimmed to the value (ie, no leading/trailing whitespace). | |
Enumerations | |
| enum | c4::RealFormat_e : char { c4::FTOA_FLOAT = 'f' , c4::FTOA_SCIENT = 'e' , c4::FTOA_FLEX = 'g' , c4::FTOA_HEXA = 'a' } |
Lightweight, very fast generic type-safe wrappers for converting individual values to/from strings.
These are the main generic functions:
And also some modest brag is in order: these functions are really fast: faster even than C++17 std::to_chars() and std::to_chars(), and many dozens of times faster than the iostream abominations.
For example, here are some benchmark comparisons for from_chars: generalized chars to value (link leads to the main project README, where these results are shown more systematically).
| g++12, linux | Visual Studio 2019 |
|---|---|
|
| enum c4::RealFormat_e : char |
Definition at line 193 of file charconv.hpp.