List of usage examples for java.lang String trim
public String trim()
From source file:Main.java
public static boolean isEmptyOrNullString(String s) { return (s == null) || (s.trim().length() == 0); }
From source file:Main.java
public static boolean validateFileName(String str) { if (str.trim().length() == 0) { return false; }/*from w w w .ja v a2 s . c om*/ String strPattern = "[^/\\:*?\"<>|]+"; Pattern p = Pattern.compile(strPattern); Matcher m = p.matcher(str); return m.matches(); }
From source file:Main.java
public static boolean isNullOrEmpty(String str) { return str == null || str.trim().equals(""); }
From source file:Main.java
public static boolean isNotBlank(String txt) { return txt != null && txt.trim().length() > 0 ? true : false; }
From source file:Main.java
public static boolean isNotNull(String txt) { return txt != null && txt.trim().length() > 0; }
From source file:Main.java
public static boolean isStringNullOrEmpty(String str) { return str == null || str.trim().length() == 0; }
From source file:Main.java
public static boolean isPasswordMatches(String password) { int length = password.trim().length(); return length >= PASSWORD_MIN_LENGTH && length <= PASSWORD_MAX_LENGTH; }
From source file:Main.java
private static boolean isInvalid(String str) { return str == null || str.trim().equals("") || str.trim().length() < 5; }
From source file:Main.java
public static synchronized boolean StrIsNull(String str) { return null == str || str.trim().length() <= 0 ? true : false; }
From source file:Main.java
public static boolean isValid(String str) { return (str != null && str.trim().length() > 0); }