code: private String stripSuffix(final String input, final String searchString) {
          final String stripped = input.replace(searchString, "");
          return stripped.trim();
      }
docs: Strip the searchString with and trim the result.
  
  @param input the source string
  @param searchString the string to look for in the source
  @return the stripped string