NSCharacterSet* nonDigits =[[NSCharacterSet decimalDigitCharacterSet] invertedSet]; int remainSecond =[[jsonObject[@"message"] stringByTrimmingCharactersInSet:nonDigits] intValue];
IOS字符串中提取数字
原文:http://my.oschina.net/wupengnash/blog/509232