Formatter 1.0.0

Formatter 1.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2016
SPMSupports SPM

Maintained by Elvis Nuñez.



Formatter 1.0.0

Formatter

CardNumberFormatter
let formatter = CardNumberFormatter()
formatter.formatString("1234 5678 1234 5678") 
// => "1234 5678 1234 5678"
CardExpirationDateFormatter
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

Installation

Formatter is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Formatter'

License

Formatter is available under the MIT license. See the LICENSE file for more info.

Author

Elvis Nuñez, @3lvis