fmt::to_string

Converts the contents of buf to a std::string.

Synopsis

Declared in <fmt/format.h>

template<size_t SIZE>
[[nodiscard]]
std::string
to_string(basic_memory_buffer<char, SIZE> const& buf);

Return Value

A std::string containing a copy of the buffer's contents.

NOTE

The return value should not be discarded.

Parameters

NameDescription
bufThe buffer to convert.