public static String substringAfterLast()

in camel-k-core/support/src/main/java/org/apache/camel/k/support/StringSupport.java [47:59]


    public static String substringAfterLast(String str, String separator) {
        if (ObjectHelper.isEmpty(str)) {
            return str;
        }
        if (ObjectHelper.isEmpty(separator)) {
            return "";
        }
        int pos = str.lastIndexOf(separator);
        if (pos == -1 || pos == str.length() - separator.length()) {
            return "";
        }
        return str.substring(pos + separator.length());
    }