16 namespace stringutils {
18 std::string
to_string(
double value,
const std::string& format_spec) {
20 if (std::ceil(value) == value &&
21 value <
static_cast<double>(std::numeric_limits<long long>::max()) &&
22 value >
static_cast<double>(std::numeric_limits<long long>::min())) {
27 return fmt::format(format_spec, value);
33 }
else if (rhs.empty()) {
36 return fmt::format(
"{}", fmt::join({lhs, rhs},
", "));