Skip to content

Instantly share code, notes, and snippets.

@ramakser
Created July 11, 2016 08:39
Show Gist options
  • Save ramakser/9f0544379abcf8b2acc346d557301b81 to your computer and use it in GitHub Desktop.
Save ramakser/9f0544379abcf8b2acc346d557301b81 to your computer and use it in GitHub Desktop.
Remove all sights except numbers from NSString
let stringArray = modelsList[indexPath.row].description.componentsSeparatedByCharactersInSet(
NSCharacterSet.decimalDigitCharacterSet().invertedSet)
let newString = stringArray.joinWithSeparator("")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment