2012年1月12日
摘要: void replaceAll(std::string& str, const std::string& from, const std::string& to){size_t start_pos = 0;while((start_pos = str.find(from, start_pos)) != std::string::npos){str.replace(start_pos, from.length(), to);start_pos += to.length(); // In case 'to' contains 'from', 阅读全文
posted @ 2012-01-12 09:45 麦田J 阅读(312) 评论(0) 推荐(0)