Java tutorial
//package com.java2s; public class Main { public static String removeSuffixIgnoreCase(String str, String suffix) { if (str != null && str.toLowerCase().endsWith(suffix.toLowerCase())) { return str.substring(0, str.length() - suffix.length()); } return str; } }