| 31 | namespace util { |
| 32 | |
| 33 | std::string Float2String(double d) { |
| 34 | if (std::isinf(d)) { |
| 35 | return d > 0 ? "inf" : "-inf"; |
| 36 | } |
| 37 | |
| 38 | return fmt::format("{:.17g}", d); |
| 39 | } |
| 40 | |
| 41 | std::string ToLower(std::string in) { |
| 42 | std::transform(in.begin(), in.end(), in.begin(), [](char c) -> char { return static_cast<char>(std::tolower(c)); }); |
no outgoing calls
no test coverage detected