formatSpace4 static method

String formatSpace4(
  1. String str,
  2. {bool end = false}
)

每隔4位加空格

end true表示从尾开始

Implementation

static String formatSpace4(
  String str, {
  bool end = false,
}) {
  return formatDigitPattern(str, 4, ' ', end: end);
}