#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSString *[email protected]"2013年5月5日";
NSString *newStr=[str stringByReplacingOccurrencesOfString:@"年" withString:@"-"];
NSString *newStr1=[newStr stringByReplacingOccurrencesOfString:@"月" withString:@"-"];
NSString *newStr2=[newStr1 stringByReplacingOccurrencesOfString:@"日" withString:@""];
NSLog(@"str=%@",newStr2);
}
return 0;
}
时间: 2024-10-28 11:34:08