Java String Last Index Of lastIndexOf(String str, String substr)

Here you can find the source of lastIndexOf(String str, String substr)

Description

last Index Of

License

Open Source License

Declaration

public static int lastIndexOf(String str, String substr) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int lastIndexOf(String str, String substr) {
        if (str != null) {
            return str.lastIndexOf(substr);
        } else {/*from w w  w  . j av  a 2 s . co  m*/
            return -1;
        }
    }

    public static int lastIndexOf(String str, String substr, int ix) {
        if (str != null) {
            return str.lastIndexOf(substr, ix);
        } else {
            return -1;
        }
    }
}

Related

  1. lastIndexOf(String s, String sub, int startIndex, int endIndex)
  2. lastIndexOf(String self, String pattern, Integer start)
  3. lastIndexOf(String str, char searchChar)
  4. lastIndexOf(String str, char searchChar)
  5. lastIndexOf(String str, String searchChar)
  6. lastIndexOf(String string, char value, int startIndex, int count)
  7. lastIndexOf(String string, char... chars)
  8. lastIndexOf(String string, String substring)
  9. lastIndexOf(String text, int startPos, String... searchStrings)