public static String str_ireplace(String s,String d, String src) {
		if (src == null || s == null || d == null) return "";
		String lcSrc = src.toLowerCase();
		String lcS = s.toLowerCase();
		int sLen = s.length();

		int pos = lcSrc.indexOf(lcS);
		if (pos == -1) {
			return src;
		}
		while (pos > -1) {
			src = src.substring(0,pos) + d + src.substring(pos + sLen);
			lcSrc = lcSrc.substring(0,pos) + d + lcSrc.substring(pos + sLen);
			pos = lcSrc.indexOf(lcS,pos+d.length());
			if (s.equals("")) break; // if we're replacing an empty string, then one replacement is enough.
		}
		return src;
	}