Java tutorial
//package com.java2s; import android.annotation.SuppressLint; public class Main { @SuppressLint("DefaultLocale") public static String findSuffix(String path, String[] ss) { path = path.toLowerCase(); for (int i = 0, len = ss.length; i < len; i++) { if (path.endsWith(ss[i].toLowerCase())) { return ss[i]; } } return null; } }