List of usage examples for java.lang String trim
public String trim()
From source file:Main.java
public static boolean isStringNullOrEmpty(String str) { if (str == null || str.trim().equals("")) return true; return false; }
From source file:Main.java
public static void copy2Clipboard(Context context, String content) { content = content.trim(); ClipboardManager cmb = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE); cmb.setText(content.trim());/*w w w . j a va 2s . co m*/ }
From source file:Main.java
public static boolean isEmptyNotNull(String str) { if (str == null || str.trim().equals("")) return true; return false; }
From source file:Main.java
public static boolean isBlank(String str) { return (str == null || str.trim().length() == 0); }
From source file:Main.java
public static float str2float(String str) { return Float.parseFloat(str.trim()); }
From source file:Main.java
public static boolean isNotBlank(String str) { return (str != null && str.trim().length() != 0); }
From source file:Main.java
public static boolean isNicknameValid(String nickname) { String trimmed = nickname.trim(); return !(trimmed.isEmpty() || trimmed.contains(" ")); }
From source file:Main.java
public static boolean islengthValid(String iString) { iString = iString.trim(); boolean result = false; if (iString.length() > 0) { result = true;/*from ww w . j av a2 s .c o m*/ } return result; }
From source file:Main.java
public static boolean isBadWalletName(String text) { return text == null || text.trim().isEmpty(); }
From source file:Main.java
public static boolean isStringNullOrEmpty(String str) { return (str == null) || (str.trim().length() == 0); }