std::string formatting like sprintf

前端 未结 30 2961
野趣味
野趣味 2020-11-22 04:42

I have to format std::string with sprintf and send it into file stream. How can I do this?

30条回答
  •  无人共我
    2020-11-22 05:22

    Poco Foundation library has a very convenient format function, which supports std::string in both the format string and the values:

    • Doc: http://pocoproject.org/docs/Poco.html#7308
    • Source: https://github.com/pocoproject/poco/blob/develop/Foundation/src/Format.cpp

提交回复
热议问题