List of utility methods to do Path Tail
String | tail(String path) tail int index = path.length() - 1; if (index >= 0 && index < path.length() && path.charAt(index) == '/') { index--; for (int i = index; i >= 0; i--) { if (path.charAt(i) == '/') { return path.substring(i + 1, index + 1); return path; |
String | tail(String path) tail int sepIdx = path.indexOf(SEP); if (sepIdx == -1) { return ""; return path.substring(sepIdx + 1); |
String | tail(String path) tail path = removeTrailingSlash(path); int index = path.lastIndexOf('/'); if (index >= 0) { return path.substring(index + 1); return path; |