List of utility methods to do String Sub String
String | substringBefore(String str, int endChar) substring Before if (str == null) { return null; if (endChar < 0) { return str; int idx = str.indexOf(endChar); if (idx == -1) { ... |
String | substringBefore(String str, String separator) substring Before if (isEmpty(str) || separator == null) { return str; if (separator.length() == 0) { return EMPTY; int pos = str.indexOf(separator); if (pos == -1) { ... |
String | substringBefore(String str, String separator) substring Before int index = str.indexOf(separator); if (index == -1) { return str; return str.substring(0, index); |
String | substringBefore(String str, String separator) substring Before if (isEmpty(str) || separator == null) { return str; if (separator.length() == 0) { return EMPTY; int pos = str.indexOf(separator); if (pos == INDEX_NOT_FOUND) { ... |
String | substringBefore(String string, String delimiter) Returns the substring before the first occurrence of a delimiter. int pos = string.indexOf(delimiter); return pos >= 0 ? string.substring(0, pos) : string; |
String | substringBefore(String text, String str) substring Before int idx = text.indexOf(str); if (idx != -1) { return text.substring(0, idx); } else { return null; |
String | substringBeforeChar(String str, int separator) Return the substring before the first occurrence of a separator. if (isEmpty(str)) { return str; int pos = str.indexOf(separator); if (pos < 0) { return str; return str.substring(0, pos); ... |
String | substringBeforeFirst(String string, String delimiter) substring Before First final int index = string.indexOf(delimiter); if (index == -1) { return ""; return string.substring(0, index); |
String | subStringBeforeFirstTab(final String s) Get the first field of a line if (s == null) { return null; final int indexFirstTab = s.indexOf('\t'); if (indexFirstTab == -1) { return s; return s.substring(0, indexFirstTab); ... |
String | substringBeforeLast(final String str, final String separator) substring Before Last if (isEmpty(str) || isEmpty(separator)) { return str; final int pos = str.lastIndexOf(separator); if (pos == INDEX_NOT_FOUND) { return str; return str.substring(0, pos); ... |