fromMoney function
dynamic
fromMoney(
- dynamic money
Implementation
fromMoney(money) {
if (isNull(money)) {
return money;
}
Characters charList = money.toString().characters;
String tmp = '';
int charListLength = charList.length;
bool needAppend = false;
for (int l = 0; l < charListLength; l++) {
String charL = charList.elementAt(l);
if (!_numberSet.contains(charL)) {
continue;
}
if (charL != '0') {
needAppend = true;
} else if (!needAppend) {
continue;
}
if (needAppend) {
tmp = '$tmp$charL';
}
}
return tmp;
}