在PHP中,我可以做到:
$new = str_replace(array('/', ':', '.'), '', $new);
...要替换字符的所有实例/:.使用空白字符串(删除它们)
我能在Objective-C中轻松做到这一点吗?还是我必须自己滚?
目前我正在打多个电话给stringByReplacingOccurrencesOfString
:
strNew = [strNew stringByReplacingOccurrencesOfString:@"/" withString:@""];
strNew = [strNew stringByReplacingOccurrencesOfString:@":" withString:@""];
strNew = [strNew stringByReplacingOccurrencesOfString:@"." withString:@""];
谢谢,