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