kformatDigitPatternEnd method

String? kformatDigitPatternEnd({
  1. int digit = 4,
  2. String pattern = ' ',
})

每隔 x位 加 pattern, 从末尾开始

    "0123456789".kformatDigitPatternEnd()} => 01 2345 6789
    "0123456789".kformatDigitPatternEnd(digit: 3, pattern: "_") => 0_123_456_789

Implementation

String? kformatDigitPatternEnd({int digit = 4, String pattern = ' '}) {
  var file = this;
  if (file == null) return null;
  String? temp = file.kreverse();
  temp = temp.kformatDigitPattern(digit: digit, pattern: pattern);
  temp = temp.kreverse();
  return temp;
}