标签:字符串操作
iOS 中怎么样替换第一个匹配的字符串
示例代码如下: NSString *utf8HtmlStr = @"xbabay"; utf8HtmlStr = [utf8HtmlStr stringByReplacingOccurrencesOfString:@"ba" withString:@"z" options:NSRegularExpressionSearch range:NSMakeRange……
05-05 立刻查看
示例代码如下: NSString *utf8HtmlStr = @"xbabay"; utf8HtmlStr = [utf8HtmlStr stringByReplacingOccurrencesOfString:@"ba" withString:@"z" options:NSRegularExpressionSearch range:NSMakeRange……