标签:com ring 字符 nss 字符串 ted dig git set
NSString * str = @"123/21年123"
NSCharacterSet *nonDigitCharacterSet = [[NSCharacterSet decimalDigitCharacterSet] invertedSet];
//获取字符串中的数字
str = [[str componentsSeparatedByCharactersInSet:nonDigitCharacterSet] componentsJoinedByString:@""];
输出12321123
标签:com ring 字符 nss 字符串 ted dig git set
原文地址:https://www.cnblogs.com/lulushen/p/9884873.html