toString method

  1. @override
String toString()
override

Returns UserNum as String formatted in quartets.

Implementation

@override
String toString() {
  String formattedUserNum = '';

  for (int i = 0; i < val.length; i++) {
    if (i % 4 == 0 && i > 0) {
      formattedUserNum += 'space'.l10n;
    }
    formattedUserNum += val[i];
  }
  return formattedUserNum.trim();
}