1、#include<boost/lexical_cast.hpp>
- 字符串转换为数字: boost::lexical_cast<int>("123");
- 数字转换为字符串: boost::lexical_cast<string>(123);
2、#include<boost/filesystem.hpp>
- 判断是否为目录:boost::filesystem::is_directory("/home/test");
3、#include<boost/algorithm/string.hpp>
- 判断是否以某字符串:boost::algorithm::end_with("/");
- 把字符串转换为小写:boost::algorithm::to_lower("Hello");
- 把字符串转换为小写并赋值给另一个字符串:string str = boost::algorithm::lower_copy("Hello");
- 把字符串按照/切分后存放到vector中:boost::algorithm::split(vec, str, boost::is_any_of("/") );