toKMB static method
Implementation
static String toKMB(
int counter,
String singularName,
String pluralName, [
Counter counterType = Counter.kmb,
]) {
if (counter > 1) {
switch (counterType) {
case Counter.k:
return "${Counter.toKCount(counter)} $pluralName";
case Counter.km:
return "${Counter.toKMCount(counter)} $pluralName";
case Counter.kmb:
default:
return "${Counter.toKMBCount(counter)} $pluralName";
}
} else {
return "$counter $singularName";
}
}