Java String Sub String substringAfterLast(String input, String delimiter)

Here you can find the source of substringAfterLast(String input, String delimiter)

Description

substring After Last

License

LGPL

Declaration

public static String substringAfterLast(String input, String delimiter) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static String substringAfterLast(String input, String delimiter) {
        final int lastIndexOfDelimiter = input.lastIndexOf(delimiter);
        if (lastIndexOfDelimiter <= 0)
            return input;
        return input.substring(lastIndexOfDelimiter + 1);
    }//  w w w  .  ja  v a  2 s.c om
}

Related

  1. substringAfterIfExist(String source, String rev)
  2. subStringAfterIgnoreCase(String str, String separator, Integer num)
  3. substringAfterLast(final String str, final String separator)
  4. substringAfterLast(final String str, final String separator)
  5. substringAfterLast(final String value, final String searchValue)
  6. substringAfterLast(String str, String pattern)
  7. substringAfterLast(String str, String separator)
  8. substringAfterLast(String str, String separator)
  9. substringAfterLast(String string, String delimiter)