private String replaceSuffix(String value,String toReplace,String changeTo){
  String vvalue;
  if ((value == null) || (toReplace == null) || (changeTo == null)) {
    return value;
  }
  vvalue=removeSuffix(value,toReplace);
  if (value.equals(vvalue)) {
    return value;
  }
 else {
    return vvalue + changeTo;
  }
}

private String replaceSuffix ( String value , String toReplace , String changeTo ) { String vvalue ; if ( ( value == null ) || ( toReplace == null ) || ( changeTo == null ) ) { return value ; } vvalue = removeSuffix ( value , toReplace ) ; if ( value . equals ( vvalue ) ) { return value ; } else { return vvalue + changeTo ; } }
replace a string suffix by another
