List of usage examples for java.lang String length
public int length()
From source file:Main.java
public static String getFileNameFromUrl(String value) { if (value.length() > 0) return value.substring(value.lastIndexOf('/') + 1); else/*from w ww . j a va 2s . c om*/ return value; }
From source file:Main.java
public static String removeNewLine(String value) { if (value.length() > 0) { value = value.replaceAll("[\n\r]", ""); }//w ww. j a va2 s .c o m return value; }
From source file:Main.java
public static String trimFirstChar(String s) { return s.length() > 1 ? s.substring(1) : ""; }
From source file:Main.java
public static boolean checkPwd(String str) { if (str.length() < 6) { return false; } else {/* w w w . j av a 2s.c om*/ return true; } }
From source file:Main.java
public static String formatTitle(String title) { if (title.length() >= 19) return title.substring(0, 12) + ".."; else//from w w w . j a v a 2 s . co m return title; }
From source file:Main.java
public static final boolean isValidEmailId(String emailid) { return emailid.length() > MIN_USERNAME_LENGTH; }
From source file:Main.java
public static boolean validatePnumCount(String str) { if (str.length() == 11) { return true; } else {/* ww w. ja v a 2 s.c o m*/ return false; } }
From source file:Main.java
public static boolean isPasswdAuthorized(String str) { return (str.length() >= 6 && str.length() <= 20); }
From source file:Main.java
public static String capitalizeFirstLetter(String original) { if (original.length() == 0) return original; return original.substring(0, 1).toUpperCase() + original.substring(1); }
From source file:Main.java
public static final boolean isValidPassword(String password) { return password.length() > MIN_PASSWORD_LENGTH; }