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

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

Description

last Index Of

License

Open Source License

Declaration

public static int lastIndexOf(String str, String searchChar) 

Method Source Code

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

public class Main {
    public static int lastIndexOf(String str, String searchChar) {
        if (isEmpty(str)) {
            return -1;
        }//from  w w  w . jav  a 2  s  .c  o m
        return str.lastIndexOf(searchChar);
    }

    public static boolean isEmpty(String command) {
        return command == null || command.trim().isEmpty();
    }
}

Related

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