Java Money isMoney(String money)

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

Description

is Money

License

Apache License

Declaration

public static boolean isMoney(String money) 

Method Source Code

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

public class Main {
    public static boolean isMoney(String money) {
        money = money.trim();// w  ww .  j av  a 2  s.  c o m

        if (money.startsWith("$")) {
            return (false);
        }

        if (money.length() > 0
                && money.trim().matches("^(\\d*(\\.\\d\\d?)?|\\d+)$")) {
            return (true);
        } else {
            return (false);
        }
    }
}

Related

  1. _getStrMoney(Object money)
  2. doubleToMoney(double value)
  3. fMoney(float pfNum)
  4. GetMoneyAmount(int amount, int CheckAmount)
  5. isMoney(String money)
  6. isMoney(String str)
  7. isMoney(String[] Moneys, String key)
  8. moneyChange(String money)
  9. moneyFenToYuan(String amount)