#include "general.hpp" void stop() { while (true) {} } UniquePtr doubleToStr(double num, unsigned int width, unsigned int precision) { auto str = make_unique(width + precision); dtostrf(num, static_cast(width), precision, str->c_str); return str; } UniquePtr intToStr(int num) { auto width = static_cast(log10(num)); auto str = make_unique(width + 1U); dtostrf(num, static_cast(width + 1U), 0, str->c_str); return str; } UniquePtr uintToStr(unsigned int num) { auto width = static_cast(log10(num)); auto str = make_unique(width + 1U); dtostrf(num, static_cast(width + 1U), 0, str->c_str); return str; }