List of utility methods to do String Left
String | left(String source, int length) left if (source == null) { return null; return ((length > source.length()) ? source : source.substring(0, length)); |
String | left(String source, String searchFor) left String resultado = source; int index = source.indexOf(searchFor); if (index > 0) resultado = source.substring(0, index); return resultado; |
String | left(String source, String searchFor) Returns the substring to the left of the specified substring in the specified String, starting from the left. int index = source.indexOf(searchFor); if (index <= 0) { return ""; return source.substring(0, index); |
String | left(String str, int count) Returns the first n characters from this string, where n = count. if (str == null) { return null; if (str.length() < count) { return str; return str.substring(0, count); |
String | left(String str, int len) left return (str == null) ? null : ((len < 0) ? "" : ((str.length() <= len) ? str : str.substring(0, len))); |
String | left(String str, int len) Gets the leftmost If if (str == null) { return null; if (len < 0) { return EMPTY; if (str.length() <= len) { return str; ... |
String | left(String str, int len) Get substring from left if (!nullOrEmpty(str) && str.length() > len) { return str.substring(0, len); return str; |
String | left(String str, int len) return str.substring(0,endIdx) * return str.substring(0, len);
|
String | left(String str, int len, String appendStrIfOver) left if (str == null) { return null; if (str.length() <= len) { return str; if (appendStrIfOver == null || appendStrIfOver.isEmpty()) { return str.substring(0, len); ... |
String | left(String str, int length) left of string String rc = NVL(str); if (rc.length() <= length) { return str; return rc.substring(0, length); |