docs: public static void replaceLast(StringBuffer haystack, String needle, String newNeedle) {
  		int idx = haystack.lastIndexOf(needle);
  		if (idx != -1) {
  			haystack.replace(idx, idx + needle.length(), newNeedle);
  		}
  	}