iPhone

[objc]NSString 문자열에서 숫자만 뽑아내기

tenn 2013. 4. 17. 10:53



문자열에서 숫자만 뽑아내기


 NSString *newString = [[origString componentsSeparatedByCharactersInSet:

            [[NSCharacterSet decimalDigitCharacterSet] invertedSet]] 

            componentsJoinedByString:@""];



http://stackoverflow.com/questions/1129521/remove-all-but-numbers-from-nsstring

저작자표시 (새창열림)