24template <c_writable T>
25[[nodiscard]] std::string
as_string(
const T& value)
noexcept {
26 std::ostringstream oss;
39template <std::ranges::range R>
40requires(c_writable<std::ranges::range_value_t<R>>)
41[[nodiscard]] std::string
join(
const R& range,
const std::string_view delimiter =
", ") {
42 std::ostringstream oss;
44 auto it = std::ranges::begin(range);
45 const auto end = std::ranges::end(range);
49 for (; it != end; ++it)
50 oss << delimiter << *it;
Provides the general concept definitions.
std::string as_string(const T &value) noexcept
Converts a value to std::string.
std::string join(const R &range, const std::string_view delimiter=", ")
Joins elements of a range into a single string with a delimiter.