ven*_*kat 0 iphone objective-c nsstring
我想像操纵NSString一样
(0)喜欢(1).(见.(2))
(0)=拉曼
(1)=你
(2)= ThisGift
至
拉曼喜欢你.(见.ThisGift)
我不知道什么approch可以解决这个问题.
在此先感谢,此致
Venkat.
-[NSString stringByReplacingOccurrencesOfString:withString:].
你这样使用它:
NSString * source = @"(0) Likes (1). (see. (2))";
source = [source stringByReplacingOccurrencesOfString:@"(0)" withString:@"Raman"];
NSLog(@"%@", source); //logs "Raman Likes (1). (see. (2))"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
733 次 |
| 最近记录: |