您的位置:首页 > 其它

使用boost查找区分大小写查找,查找一个字符串在另外一个字符串的位置,返回索引。

2011-02-25 09:29 543 查看
http://blog.csdn.net/NetLinux



std::string strPath("C://Windows//System32//drivers");

std::string strZune = "drivers";

int pos = 0;



boost::iterator_range<std::string::iterator> retFind= boost::ifind_first(strPath, strZune);

pos = retFind.begin() - strPath.begin();

strPath.erase(retFind.end(), strPath.end());
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐