public String removeSuffix(String original,String suffix){
  if (original.endsWith(suffix)) {
    return original.substring(0,original.length() - suffix.length());
  }
  return original;
}

public String removeSuffix ( String original , String suffix ) { if ( original . endsWith ( suffix ) ) { return original . substring ( 0 , original . length ( ) - suffix . length ( ) ) ; } return original ; }
this method removes the supplied suffix ( if it exists ) in the supplied ' original ' string .
