Here you can find the source of substringBeforeLastIgnoreCase(final String target, final String separator)
public static String substringBeforeLastIgnoreCase(final String target, final String separator)
//package com.java2s; //License from project: Apache License public class Main { public static String substringBeforeLastIgnoreCase(final String target, final String separator) { if ("".equals(target)) return target; if ("".equals(separator)) return target; final String tempStr = target.toUpperCase(); final String tempSeparator = separator.toUpperCase(); final int index = tempStr.lastIndexOf(tempSeparator); if (index == -1) return target; return target.substring(0, index); }//from ww w . j a v a 2 s .c o m }