Java String Ends With endsWithAnyIC(String str, String[] needles)

Here you can find the source of endsWithAnyIC(String str, String[] needles)

Description

ends With Any IC

License

Open Source License

Declaration

public static boolean endsWithAnyIC(String str, String[] needles) 

Method Source Code

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

public class Main {
    public static boolean endsWithAnyIC(String str, String[] needles) {
        if (str == null || str.length() == 0 || needles == null || needles.length == 0)
            return false;
        str = str.toLowerCase();//from w ww. j  av  a 2 s.  c o  m
        for (String n : needles) {
            if (str.endsWith(n))
                return true;
        }
        return false;
    }
}

Related

  1. endsWithAny(final byte[] str, int startIndex, int endIndex, final byte... chars)
  2. endsWithAny(String str, String... args)
  3. endsWithAny(String string, String searchStrings[])
  4. endsWithAny(String stringToMatch, String... stringToCheckEquals)
  5. endsWithAnyCI(String string, String... suffixes)
  6. endsWithBackslash(final String s)
  7. endsWithChar(CharSequence s, char suffix)
  8. endsWithChar(final String s, final char c)
  9. endsWithChar(String s, char c)