检测字符串是否全部是大写字母

@param string 字符串

@return {@link Boolean}

@since 1.0.9
420208
public static boolean isOnlyUpperCase(String string) {
        boolean result = isNotEmpty(string);
        int idx = 0;
        int len = string.length();
        while (result) {
            if (idx >= len) {
                break;
            }
            result = isUpperCase(string.charAt(idx));
            idx++;
        }
        return result;
    }
435583
public static function isPoint($string)
    {
        if (gettype($string) === 'string') {
            $parts = explode("\x20", $string);
            if (count($parts) == 2) {
                if (self::isInteger($parts[0]) && self::isInteger($parts[1])) {
                    return true;
                }
            }
        }

        return false;
    }
849033
private static String matchDoneBigDecimal(String bigDecimal) {
        // 对科学计数法进行处理
        boolean flg = Pattern.matches("^-?\\d+(\\.\\d+)?(E-?\\d+)?$", bigDecimal);
        if (flg) {
            BigDecimal bd = new BigDecimal(bigDecimal);
            bigDecimal = bd.toPlainString();
        }
        return bigDecimal;
    }
1316039
public static String getWithFirstUpperCase(String string) {
        if (string == null) {
            return "";
        }

        if (string.length() == 1) {
            return string.substring(0, 1).toUpperCase();
        }

        return string.substring(0, 1).toUpperCase() + string.substring(1);
    }
882513
public static function isValid($string)
    {
        if (is_int($string) || is_float($string)) {
            return true;
        }

        json_decode($string);

        return json_last_error() === JSON_ERROR_NONE;
    }
964012
public boolean getBooleanResult(final CharSequence equation) {
        final Element result = new ValueElement(getResult(equation), null, null);
        if (result.isBoolean()) {
            return result.getBoolean();
        } else if (result.isInt()) {
            return result.getInt() > 0;
        } else if (result.isFloat()) {
            return result.getFloat() > 0f;
        }
        return !isNullOrFalse(result.getString());
    }
697443
public static function getBoolean($string) {
    $val = filter_var($string, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
    if ($val === null) {
      return $string;
    }
    return $val;
  }
34852
public static function stringToBoolean($string)
    {
        $flag = filter_var($string, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);

        if ($flag) {
            return true;
        } elseif (is_null($flag)) {
            return $string;
        }

        return false;
    }
907834
public static boolean isNumeric(final String string) {
        try {
            Double.parseDouble(string);
        } catch (final Exception e) {
            return false;
        }

        return true;
    }
525087
public static final boolean stringIsBlank(final String string) {

        if (string == null || string.length() == 0) {
            return true;
        }

        int stringLength = string.length();
        for (int i = 0; i < stringLength; i++) {
            if (Character.isWhitespace(string.charAt(i)) == false) {
                return false;
            }
        }
        return true;
    }
395107
public boolean getBoolean(String key) {
    String value = getString(key);
    return StringUtils.isNotEmpty(value) && Boolean.parseBoolean(value);
  }
214481
public static boolean mayBeJSON( String string ) {
      return string != null
            && ("null".equals( string )
                  || (string.startsWith( "[" ) && string.endsWith( "]" )) || (string.startsWith( "{" ) && string.endsWith( "}" )));
   }
1047785
public static boolean isNumeric(String string)
  {
    if(string == null || string.isEmpty()) return false;

    State state = State.SIGN;
    for(int i = 0; i < string.length(); ++i) {
      char c = string.charAt(i);

      switch(state) {
      case SIGN:
        if(c == '-' || c == '+') {
          state = State.INTEGER;
          break;
        }
        if(c == DECIMAL_SEPARATOR) {
          state = State.FRACTIONAL;
          break;
        }
        if(Character.isDigit(c)) {
          state = State.INTEGER;
          break;
        }
        return false;

      case INTEGER:
        if(Character.isDigit(c)) {
          break;
        }
        if(c == GROUPING_SEPARATOR) {
          break;
        }
        if(c == DECIMAL_SEPARATOR) {
          state = State.FRACTIONAL;
          break;
        }
        if(c == 'e' || c == 'E') {
          state = State.EXPONENT_SIGN;
          break;
        }
        if(isNumericSuffix(c)) {
          state = State.END;
          break;
        }
        return false;

      case FRACTIONAL:
        if(c == 'e' || c == 'E') {
          state = State.EXPONENT_SIGN;
          break;
        }
        if(isNumericSuffix(c)) {
          state = State.END;
          break;
        }
        if(Character.isDigit(c)) {
          break;
        }
        return false;

      case EXPONENT_SIGN:
        if(c == '-' || c == '+') {
          state = State.EXPONENT;
          break;
        }
        if(Character.isDigit(c)) {
          break;
        }
        return false;

      case EXPONENT:
        if(isNumericSuffix(c)) {
          state = State.END;
          break;
        }
        if(Character.isDigit(c)) {
          break;
        }
        return false;

      case END:
        return false;

      default:
        throw new IllegalStateException();
      }

    }
    return true;
  }
574079
public static Boolean toBoolean(String self) {
        final String trimmed = self.trim();

        if ("true".equalsIgnoreCase(trimmed) || "y".equalsIgnoreCase(trimmed) || "1".equals(trimmed)) {
            return Boolean.TRUE;
        } else {
            return Boolean.FALSE;
        }
    }
245347
public boolean getBool(String name) {

		Object value = super.get(name);

		if (value instanceof Boolean) {
			return (Boolean) value;
		}

		if (value instanceof String) {
			String txt = (String)value;
			txt = txt.trim().toLowerCase();

			if ("yes".equals(txt) || "y".equals(txt) || "1".equals(txt) || "true".equals(txt) || "t".equals(txt)) {
				return true;
			}

			if ("no".equals(txt) || "n".equals(txt) || "0".equals(txt) || "false".equals(txt) || "f".equals(txt)) {
				return false;
			}
		}

		if (value == null) {
			throw new IllegalArgumentException("Setting: '" + name + "', not found!");
		}

		throw new IllegalArgumentException("Setting: '" + name + "', can't be converted to boolean: '" + value + "'!");
	}
381869
public static boolean isAllNum(String str)
    {
        if (str == null)
            return false;

        int i = 0;
        /** 判断开头是否是+-之类的符号 */
        if ("±+-＋－—".indexOf(str.charAt(0)) != -1)
            i++;
        /** 如果是全角的０１２３４５６７８９ 字符* */
        while (i < str.length() && "０１２３４５６７８９".indexOf(str.charAt(i)) != -1)
            i++;
        // Get middle delimiter such as .
        if (i > 0 && i < str.length())
        {
            char ch = str.charAt(i);
            if ("·∶:，,．.／/".indexOf(ch) != -1)
            {// 98．1％
                i++;
                while (i < str.length() && "０１２３４５６７８９".indexOf(str.charAt(i)) != -1)
                    i++;
            }
        }
        if (i >= str.length())
            return true;

        /** 如果是半角的0123456789字符* */
        while (i < str.length() && "0123456789".indexOf(str.charAt(i)) != -1)
            i++;
        // Get middle delimiter such as .
        if (i > 0 && i < str.length())
        {
            char ch = str.charAt(i);
            if (',' == ch || '.' == ch || '/' == ch  || ':' == ch || "∶·，．／".indexOf(ch) != -1)
            {// 98．1％
                i++;
                while (i < str.length() && "0123456789".indexOf(str.charAt(i)) != -1)
                    i++;
            }
        }

        if (i < str.length())
        {
            if ("百千万亿佰仟%％‰".indexOf(str.charAt(i)) != -1)
                i++;
        }
        if (i >= str.length())
            return true;

        return false;
    }
667973
public String convertString(String string)
    {        
        int start;
        int end = 0;
        while ((start = string.indexOf("k", end)) > 0)
        {
            end = start + 1;
            char ch = string.charAt(start - 1);
            if ((ch != '.') && (ch != ' '))
                continue;
            ch = string.charAt(start + 1);
            if (!Character.isUpperCase(ch))
                continue;
            boolean isUpper = false;
            for (; end < string.length(); end++)
            {
                 ch = string.charAt(end);
                if (!Character.isJavaIdentifierPart(ch))
                    break;
                if (!Character.isUpperCase(ch))
                    isUpper = true;
            }
            if (!isUpper) if ((end - start) >= 3)
                continue;
            if (end >= string.length())
                break;

            String newName = convertNameToConstant(string.substring(start+1, end));
            
            string = string.substring(0, start) + newName + string.substring(end);

        }
        return string;
    }