let formatter = CardNumberFormatter()
formatter.formatString("1234 5678 1234 5678")
// => "1234 5678 1234 5678"let formatter = CardExpirationDateFormatter()
formatter.formatString("0119")
// => 01/19Use reverse to return the formatted text to its original form.
let formatter = CardExpirationDateFormatter()
formatter.formatString("01/19", reverse:true)
// => 0119Formatter is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Formatter'Formatter is available under the MIT license. See the LICENSE file for more info.
Elvis Nuñez, @3lvis