rapidyaml 0.15.2
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
scalar_charconv.hpp File Reference
#include "c4/yml/common.hpp"
#include "c4/yml/error.hpp"
#include <c4/charconv.hpp>

Go to the source code of this file.

Namespaces

namespace  c4
namespace  c4::yml

Functions

bool c4::yml::scalar_is_null (csubstr s) noexcept
 YAML-sense query of nullity.
bool c4::yml::scalar_is_plain_number_json (csubstr s) noexcept
 JSON-sense query of plain number.
bool c4::yml::scalar_is_inf3 (const char *s) noexcept
 Query if a scalar is inf (inf, Inf, INF).
bool c4::yml::scalar_is_nan3 (const char *s) noexcept
 Query if a scalar is nan (nan, NaN, Nan, NAN).
bool c4::yml::scalar_is_inf_or_nan3 (const char *s) noexcept
 Same as scalar_is_inf3() || scalar_is_nan3().
bool c4::yml::scalar_is_special_json (csubstr s) noexcept
 Query if a scalar is plain, eg, true, false, null, +-.inf or .nan.
template<class T>
bool c4::yml::from_chars_float (csubstr scalar, T *val) RYML_NOEXCEPT
 Deserialize a floating point from string.
template<class T>
size_t c4::yml::to_chars_float (substr buf, T val) RYML_NOEXCEPT
 Serialize a floating point value to a string.
template<class T>
bool c4::yml::from_chars_integral (csubstr scalar, T *val) RYML_NOEXCEPT
 Deserialize an integral scalar.
template<class T>
bool c4::yml::scalar_deserialize (csubstr str, T *val)
 Deserialize a scalar from its string representation, dispatching to one of from_chars(), from_chars_float() or from_chars_integral() as appropriate.
template<class T>
size_t c4::yml::scalar_serialize (substr buf, T const &a)
 Serialize a scalar to the buffer, dispatching to to_chars() or to_chars_float() as appropriate.