Java Money moneyChange(String money)

Here you can find the source of moneyChange(String money)

Description

money Change

License

Apache License

Declaration

private static String moneyChange(String money) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static String moneyChange(String money) {
        int index = money.indexOf(".");
        String head = money.substring(0, index);
        String end = money.substring(index + 1);
        if (head.equals("0")) {
            if (end.startsWith("0")) {
                return Integer.parseInt(end) + "";
            }//from   w  w  w  . j  a  v  a  2 s. c  o  m
            return end;
        }

        return head + end;
    }
}

Related

  1. GetMoneyAmount(int amount, int CheckAmount)
  2. isMoney(String money)
  3. isMoney(String money)
  4. isMoney(String str)
  5. isMoney(String[] Moneys, String key)
  6. moneyFenToYuan(String amount)
  7. moneyMinus(float a, float b)
  8. multiMoney(Integer money)
  9. string2Money(String money)