std::string format替代
c++ - std::string formatting like sprintf
最简单的方法就是用c语言的。
char buff[100];
snprintf(buff, sizeof(buff), "%s", "Hello");
std::string buffAsStdStr = buff;
Referenced from:https://stackoverflow.com/questions/2342162/stdstring-formatting-like-sprintf
本文链接地址:https://const.net.cn/178.html