字符串替换
2013-11-26 17:32
155 查看
给个例子 NSString *str = @"Hello world!";
str =[str stringByReplacingOccurrencesOfString:@"world" withString:@"India"];
NSlog(@"Your String is = %@",str);
复制代码你将会看到输入Hello India
str =[str stringByReplacingOccurrencesOfString:@"world" withString:@"India"];
NSlog(@"Your String is = %@",str);
复制代码你将会看到输入Hello India
相关文章推荐
- 用C++定义一个类Torch,计算奥运火炬传递总时间
- 浙工ACM1395
- javascript的parseFloat()方法精度问题探讨
- Android 用webService产生java.lang.ClassCastException: org.ksoap2.serialization.SoapPrimitive错误的解决 .
- SIP协议性能测试工具SIPp参数详解
- 创业干货分享:初创公司移动应用开发工具库(集合)
- Activity 4种启动模式 图文解释
- SQL SERVER获取数据库文件信息
- B. Dima and To-do List
- Ubuntu 13.10中安装eclipse后菜单栏下拉失效
- Intent以及IntentFilter
- 指针函数与函数指针的区别
- glassfish Client not authorized for this invocation.解决办法
- js动态时钟
- JVM 专题
- MFC实现按下工具栏的某个按钮清除当前活动视图的内容
- 在wireshark里添加新的dissector遇到的问题及解决方法
- java web开发学习-5 实战1
- java web开发学习-4 常用技术介绍
- 支付宝接口使用步骤及总结