Java tutorial
//package com.java2s; //License from project: Apache License public class Main { public static boolean endsWithAny(String stringToMatch, String... stringToCheckEquals) { for (final String candidate : stringToCheckEquals) { if (stringToMatch.endsWith(candidate)) { return true; } } return false; } }