Here you can find the source of endsWithIgnoreCase(String input, String... suffixes)
Parameter | Description |
---|---|
input | the input string to test |
suffixes | the list of suffixes |
public static boolean endsWithIgnoreCase(String input, String... suffixes)
//package com.java2s; //License from project: GNU General Public License public class Main { /**/*from w w w. jav a2 s. c o m*/ * Tests if this string ends with any of the given suffixes, ignoring the case sensitive. * * @param input the input string to test * @param suffixes the list of suffixes * @return {@code true} if the input string is a prefix; {@code false} otherwise. */ public static boolean endsWithIgnoreCase(String input, String... suffixes) { boolean found = true; String lowerInput = input.toLowerCase(); if (suffixes != null && suffixes.length > 0) { for (String suffix : suffixes) { found = lowerInput.endsWith(suffix.toLowerCase()); if (found) break; } } return found; } }