public static boolean isDecString(final String string) {
    Preconditions.checkNotNull(string);

    final CharMatcher cm = CharMatcher.inRange('0', '9');
    for (int i = 0; i < string.length(); i++) {
      if (!cm.apply(string.charAt(i))) {
        return false;
      }
    }
    return string.length() != 0;
  }
Tests whether a given string is a valid decimal string.

@param string The string to check.
@return True, if the string is a valid decimal string. False, otherwise.
java/zylib/src/main/java/com/google/security/zynamics/zylib/general/Convert.java