withUnit static method
with unit. 拼接单位. 输出价格
Implementation
static String withUnit(String moneyTxt, MoneyUnit unit) {
switch (unit) {
case MoneyUnit.yuan:
moneyTxt = yuan + moneyTxt;
break;
case MoneyUnit.yuanZh:
moneyTxt = moneyTxt + yuanZh;
break;
case MoneyUnit.dollar:
moneyTxt = dollar + moneyTxt;
break;
default:
break;
}
return moneyTxt;
}