cocos2dx开发之util类&方法——字符串替换
2024-10-18 21:22:09
/*将originStr字符串中的searchStr替换成replaceStr*/
std::string str_replace(std::string originStr,std::string searchStr,std::string replaceStr){
std::string::size_type pos = ;
while((pos = originStr.find(searchStr, pos)) != std::string::npos) {
originStr.replace(pos, searchStr.size(), replaceStr);
pos++;
}
return originStr;
}
最新文章
- mysql基础语法及拓展到web中的sql注入
- yocto系统介绍
- 树莓派系统安装、HDMI显示
- 【转】 SQL 2005 try catch
- div滚动到页面顶端后固定住
- http-equiv
- apache win openssl
- [LeetCode]题解(python):073-Set Matrix Zeroes
- MySQL字段自增自减的SQL语句
- How To:禁用ubuntu全局菜单(global menu)的方法
- Caused by: java.lang.ClassNotFoundException: org.hibernate.engine.FilterDefinition
- 初识shell编程
- java解析json数据用到的jar包
- Pycharm基本设置和插件安装
- python历史与基本类型
- ucml 子业务组件与行为参与者业务组件
- smali语法详解
- Spark-Sql之DataFrame实战详解
- 比较正确的 iPhone7/7+ 的进入DFU的方法是这样的
- Linux 设置程序开机自启动 (命令systemctl 和 chkconfig用法区别比较)