rapidyaml  0.9.0
parse and emit YAML, and do it fast
uncatsep: deserialize the separated arguments from a string

Functions

template<class Sep , class Arg , class... Args>
size_t c4::uncatsep (csubstr buf, Sep &sep, Arg &a, Args &...more)
 deserialize the arguments from the given buffer. More...
 

Detailed Description

Function Documentation

◆ uncatsep()

template<class Sep , class Arg , class... Args>
size_t c4::uncatsep ( csubstr  buf,
Sep &  sep,
Arg &  a,
Args &...  more 
)

deserialize the arguments from the given buffer.

Returns
the number of characters read from the buffer, or csubstr::npos if a conversion was not successful.
See also
c4::cat(). c4::uncat() is the inverse of c4::cat(). deserialize the arguments from the given buffer, using a separator.
Returns
the number of characters read from the buffer, or csubstr::npos if a conversion was not successful
See also
c4::catsep(). c4::uncatsep() is the inverse of c4::catsep().

Definition at line 768 of file format.hpp.

769 {
770  size_t ret = from_chars_first(buf, &a), num = ret;
771  if(C4_UNLIKELY(ret == csubstr::npos))
772  return csubstr::npos;
773  buf = buf.len >= ret ? buf.sub(ret) : substr{};
774  ret = detail::uncatsep_more(buf, sep, more...);
775  if(C4_UNLIKELY(ret == csubstr::npos))
776  return csubstr::npos;
777  num += ret;
778  return num;
779 }
size_t from_chars_first(csubstr buf, fmt::raw_wrapper r)
read a variable in raw binary format, using memcpy
Definition: format.hpp:486
@ npos
a null string position
Definition: common.hpp:267

References c4::from_chars_first(), and c4::yml::npos.

Referenced by sample::sample_formatting().