Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.Collection; public class Main { /** * This function filters the input collection and returns a collection of elements ending with specified input (Ignore Case). * @param coll * @param str * @return Filtered Collection<String> */ public static Collection<String> endsWithStringIgnoreCase(Collection<String> coll, final String str) { Collection<String> list = new ArrayList<String>(); for (String item : coll) { if (item.toLowerCase().endsWith(str.toLowerCase())) { list.add(item); } } return list; } }