List of utility methods to do String Sub String Get
String | substringBefore(String text, char separator) Gives the substring of the given text before the given separator. if (isEmpty(text)) { return text; int sepPos = text.indexOf(separator); if (sepPos < 0) { return text; return text.substring(0, sepPos); ... |
String | substringBeforeLast(String text, char separator) Gives the substring of the given text before the last occurrence of the given separator. if (isEmpty(text)) { return text; int cPos = text.lastIndexOf(separator); if (cPos < 0) { return text; return text.substring(0, cPos); ... |