Java String Ends With endsWithIgnoreCase(String source, String eq)

Here you can find the source of endsWithIgnoreCase(String source, String eq)

Description

ends With Ignore Case

License

Apache License

Declaration


public static boolean endsWithIgnoreCase(String source, String eq) 

Method Source Code

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

public class Main {

    public static boolean endsWithIgnoreCase(String source, String eq) {

        int temp = eq.length();

        if (eq.length() > source.length()) {
            return false;
        }//from w w w .j a v a 2  s . c om

        return source.substring(source.length() - temp).equalsIgnoreCase(eq);

    }
}

Related

  1. endsWithIgnoreCase(String p_sStr, String p_sSubStr)
  2. endsWithIgnoreCase(String s, String suffix)
  3. endsWithIgnoreCase(String s, String suffix)
  4. endsWithIgnoreCase(String s, String w)
  5. endsWithIgnoreCase(String seq, String suffix)
  6. endsWithIgnoreCase(String str, String suffix)
  7. endsWithIgnoreCase(String str, String suffix)
  8. endsWithIgnoreCase(String str, String suffix)
  9. endsWithIgnoreCase(String str, String suffix)