List of utility methods to do String Sub String
String | substring(String string, int start, int length) substring if (length < 0) throw new IndexOutOfBoundsException("Parameter length cannot be negative."); return string.substring(start, start + length); |
String | substring(String string, String beginning, String end) substring if (!string.contains(beginning) || !string.contains(end) || string.indexOf(beginning) >= string.indexOf(end)) return null; else { String after_beginning = string.substring(string.indexOf(beginning) + beginning.length()); return after_beginning.substring(0, after_beginning.indexOf(end)); |
String | subString(String string, String inizio, String fine) taglia una stringa da un determinato carattere a un altro String ritorno = null, stringaDaButtare = string; if (contains(string, inizio) && contains(string, fine)) { int firstPosition = string.indexOf(inizio); firstPosition++; int secondPosition = string.indexOf(fine, firstPosition); ritorno = stringaDaButtare.substring(firstPosition, secondPosition); return ritorno; ... |
String | substring(String subject, int start, int end) substring if (subject != null && start < subject.length()) { return subject.substring(start, end); return ""; |
String | substring(String text, int begin, int end) substring return text.substring(Math.min(text.length(), begin), Math.min(text.length(), end));
|
String | substring(String text, int start, int end) substring if (text == null) return null; int spos = text.offsetByCodePoints(0, start); int epos = text.length() < end ? text.length() : end; return text.substring(spos, text.offsetByCodePoints(spos, epos - start)); |
String | substring(String text, int startPos, int endPos) substring String str = NVL(text);
str = fill(str, endPos);
return str.substring(startPos, endPos).trim();
|
String | substring(String text, int startPos, int len) Perform "substring" using start position and length. assert validSubstring(text, startPos, len); return text.substring(startPos, startPos + len); |
String | subString(String text, String leadingPart) gets the substring of the given text reduced by the given leading part. if (text.startsWith(leadingPart)) { return text.substring(leadingPart.length()); } else { return text; |
String | subString(String val, int start, int end) sub String if (!isEmpty(val) && val.length() >= end) { return val.substring(start, end); return val; |