摘要:
#include <boost/algorithm/string.hpp> //转 大/小 写 boost::to_upper(s); std::cout << s << std::endl; boost::to_lower(s); std::cout << s << std::endl; //转 阅读全文
posted @ 2021-03-06 17:03
osbreak
阅读(531)
评论(0)
推荐(0)
摘要:
boost::lexical_cast 是 C++ 中最优雅的类型转换工具之一,尤其适合配置解析、CLI 参数处理、日志系统等场景。 // 字符串 转 数值 try { std::string str1 = "123"; int n = boost::lexical_cast<int>(str1); 阅读全文
posted @ 2021-03-06 16:30
osbreak
阅读(143)
评论(0)
推荐(0)
浙公网安备 33010602011771号