code: public static String removeLast(String original, String string) {
  		int lastIndexOf = original.lastIndexOf(string);
  		if (lastIndexOf == -1) {
  			return original;
  		}
  		return original.substring(0, lastIndexOf);
  	}
docs: This method create nre properties from the origianl one and remove any key
  with the password , then call toString method on this prperties.
  
  @param original the original
  @param string   the string
  @return the string