private String removeSuffix(String value,String toRemove){
  if ((value == null) || (toRemove == null) || !suffix(value,toRemove)) {
    return value;
  }
  return value.substring(0,value.length() - toRemove.length());
}

private String removeSuffix ( String value , String toRemove ) { if ( ( value == null ) || ( toRemove == null ) || ! suffix ( value , toRemove ) ) { return value ; } return value . substring ( 0 , value . length ( ) - toRemove . length ( ) ) ; }
remove a string suffix
