Checks if the given String is empty.
@param string The String to validate.
@throws ParameterException if the given String is empty.
351082
public static void notEmpty(String string)  {
		if(!validation) return;
		notNull(string);
		if(string.length() == 0)
			throw new ParameterException(ErrorCode.EMPTY);
	}
835757
@Nullable
    public static String emptyToNull(@Nullable String string) {
        return isNullOrEmpty(string) ? null : string;
    }
473668
public void add(final String string) {
    checkNotNull(string);
    candidates.put(string, candidate(string));
  }
776491
public static void notEmpty(String string, String message)  {
		if(!validation) return;
		notNull(message);
		notNull(string, message);
		if(string.length() == 0)
			throw new ParameterException(ErrorCode.EMPTY, message);
	}
743914
def _check_not_empty(string):
    
    string = string.strip()

    if len(string) == 0:
        message = 'The string should not be empty'
        raise pp.ParseException(message)
858727
private function assertAllNonEmptyString(array $values, $parameterName)
    {
        foreach ($values as $value) {
            $this->assertNonEmptyString(
                $value,
                $parameterName,
                'Elements of "%s" must be non-empty strings, element of type "%s" given'
            );
        }
    }
210619
public void setString(String string) {

        this.string = string;
        if (string != null) {
            this.length = string.length();
            chars = this.string.toCharArray();
        } else {
            this.length = 0;
            chars = new char[0];
        }
        reset();

    }
546201
public void contains(CharSequence string) {
    checkNotNull(string);
    if (actual() == null) {
      failWithActual("expected a string that contains", string);
    } else if (!actual().contains(string)) {
      failWithActual("expected to contain", string);
    }
  }
133744
@Override
	public void declareParameters(String paramString) {
		checkUnmodifiable();
		parameters.clear();
		paramString = paramString.trim();
		int i1 = paramString.indexOf(',');
		while (i1 >= 0) {
			String p1 = paramString.substring(0, i1).trim();
			updateParameterDeclaration(p1);
			paramString = paramString.substring(i1+1, paramString.length()).trim();
			i1 = paramString.indexOf(',');
		}
		updateParameterDeclaration(paramString);
		resetQuery();
	}
655523
public static boolean isNullOrEmptyOrQuestionMark(final String string) {
        if (string == null || string.length() == 0 || "?".equals(string)) {
            return true;
        }
        return false;
    }
369671
private void setNonEmptyStringParameter(String key, String value){
        if (value == null){
            parameters.remove(key);
        }
        else if (value.length() == 0){
            throw new IllegalArgumentException("Value cannot be empty.");
        }
        else{
            parameters.put(key, value);
        }
    }
282217
private void checkStringIsValidName(final String s) throws PackageNameException {
        final boolean packageContainsJavaKeyword = javaKeywords.stream().anyMatch(s::equals);
        if (packageContainsJavaKeyword || s.matches("\\d.*")) {
            throw new PackageNameException("string is not valid");
        }
    }
196719
public void parse(String... args) {
        try {
            parse(true /* validate */, args);
        } catch(ParameterException ex) {
            ex.setJCommander(this);
            throw ex;
        }
    }
902719
public static boolean isEmpty(String str) {
        if (str == null)
            return true;
        if ("".equals(str.trim()))
            return true;
        return str.isEmpty();
    }
1370682
public static boolean isEmpty(final String str) {
        if(str == null || str.isEmpty()) {
            return true;
        }
        
        if(str.length() == 1) {
            return str.charAt(0) == '\u0000';
        }
        
        return false;
    }
865299
public static function validate($string)
    {
        try {
            if (is_numeric($string) && (int)$string == $string) {
                $date = new DateTime('@' . $string);
            } else {
                $date = self::parse($string);
            }
        } catch (Exception $ex) {
            return false;
        }

        // String is empty or not a valid date
        if (empty($string) || $date === false) {
            return false;

            // String is a valid date
        } else {
            return true;
        }
    }
1044468
public static boolean isNullOrEmpty(String string) {
    return com.google.common.base.Strings.isNullOrEmpty(string);
  }