NSArray *dateArray = [date componentsSeparatedByString:@"-"];
NSString *year = [dateArray objectAtIndex:0];
NSString *month = [dateArray objectAtIndex:1];
NSString *day = [dateArray objectAtIndex:2];
将字符串按照特定符号分割成字符串数组
ios开发---字符串分割
最新推荐文章于 2024-04-20 15:15:45 发布