getDisplayAmexNumberFormat static method
Implementation
static String getDisplayAmexNumberFormat(String input) {
// amex 4-6-5, same grouping as [CardTypeRegs.groupDigits]
final digits = input.replaceAll(RegExp(r'\D'), '');
final max = CardTypeRegs.maxDigits(CardBrand.amex);
final capped = digits.length > max ? digits.substring(0, max) : digits;
return _groupAmex(capped);
}