code: public static String replaceIgnoreCase(String text, String findtxt, String replacetxt) {
  		if (text == null)
  			return null;
  		String str = text;
  		if (findtxt == null || findtxt.length() == 0) {
  			return str;
  		}
  		if (findtxt.length() > str.length()) {
  			return str;
  		}
  		int counter = 0;
  		String thesubstr;
  		while ((counter < str.length()) && (str.substring(counter).length() >= findtxt.length())) {
  			thesubstr = str.substring(counter, counter + findtxt.length());
  			if (thesubstr.equalsIgnoreCase(findtxt)) {
  				str = str.substring(0, counter) + replacetxt + str.substring(counter + findtxt.length());
  				counter += replacetxt.length();
  			} else {
  				counter++;
  			}
  		}
  		return str;
  	}
docs: Replace all sub strings ignore case <br/>
  replaceIgnoreCase("AbcDECd", "Cd", "FF") = "AbFFEFF"