code: public static Optional<String> trimEnd(final String input) {
          return Optional.ofNullable(input).filter(v -> !v.isEmpty()).map(Strman::rightTrim);
      }
docs: Removes trailing whitespace from string.
  
  @param input The string to trim.
  @return Returns the trimmed string.