TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2016 |
SPMSupports SPM | ✗ |
Maintained by Elvis Nuñez.
let formatter = CardNumberFormatter()
formatter.formatString("1234 5678 1234 5678")
// => "1234 5678 1234 5678"
let formatter = CardExpirationDateFormatter()
formatter.formatString("0119")
// => 01/19
Use reverse
to return the formatted text to its original form.
let formatter = CardExpirationDateFormatter()
formatter.formatString("01/19", reverse:true)
// => 0119
Formatter 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