塞选字符

NSArray *array = [date componentsSeparatedByCharactersInSet:[[NSCharacterSet characterSetWithCharactersInString:NUMBERS] invertedSet]];
            NSMutableString *newDate = [NSMutableString string];
            for (NSString *str in array) {
                [newDate appendString:str];
            }

你可能感兴趣的:(塞选字符)