jlandon / Alexandria

A library of Swift extensions to turbocharge your iOS development.
https://jlandon.github.io/Alexandria
MIT License
65 stars 8 forks source link

isNumeric string extension #13

Closed apcorc closed 8 years ago

apcorc commented 8 years ago

A string extension to validate if every character within the string is numeric.

Usage:

if let myString = textField.text where myString.isNumeric {
  // User typed valid numeric non-empty entry
}
hsoi commented 8 years ago

Add tests.

hsoi commented 8 years ago

:+1:

jlandon commented 8 years ago

Looks good :+1: