Java String Ends With endsWith(String inEnd, String inValue)

Here you can find the source of endsWith(String inEnd, String inValue)

Description

NPE safe String startsWith

License

Open Source License

Parameter

Parameter Description
inStart a parameter
inValue a parameter

Declaration

public static boolean endsWith(String inEnd, String inValue) 

Method Source Code

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

public class Main {
    /**/*from w  w w.ja  v  a  2 s.com*/
     * NPE safe {@link String} startsWith
     * 
     * @param inStart
     * @param inValue
     * @return
     */
    public static boolean endsWith(String inEnd, String inValue) {

        if (inEnd == null && inValue == null) {

            return true;

        } else if (inEnd == null || inValue == null) {

            return false;
        }

        return inValue.endsWith(inEnd);
    }
}

Related

  1. endsWith(String baseString, String compareString)
  2. endsWith(String filePath, String extension)
  3. endsWith(String fullString, String subString)
  4. endsWith(String haystack, String needle)
  5. endsWith(String in, String str)
  6. endsWith(String receiver, String... needles)
  7. endsWith(String s, char c)
  8. endsWith(String s, String end)
  9. endsWith(String s, String end)