【发布时间】:2014-04-24 07:35:09
【问题描述】:
我有一个 NSString:
NSString *string1 = @"http://example.com/this-is-an-example-post"
通过删除一系列字符,我将其子字符串化为:
NSString *string2 = @"this-is-an-example-post"
但我正在努力将其转化为:
NSString *string3 = @"this is an example post"
有什么帮助吗?非常感谢。
【问题讨论】:
-
stringByReplacingOccurrencesOfString: withString:
标签: ios objective-c nsstring nsrange