Function to_chars_sub

Synopsis

#include <src/c4/charconv.hpp>

template <class T>
substr to_chars_sub(substr buf, T const &C4_RESTRICT v)

Description

call to_chars() and return a substr consisting of the written portion of the input buffer. Ie, same as to_chars(), but return a substr instead of a size_t.

See
to_chars()

Mentioned in

Source

Lines 1356-1361 in src/c4/charconv.hpp.

template<class T>
inline substr to_chars_sub(substr buf, T const& C4_RESTRICT v)
{
    size_t sz = to_chars(buf, v);
    return buf.left_of(sz <= buf.len ? sz : buf.len);
}





Add Discussion as Guest

Log in