code: @Nullable
    @CheckReturnValue
    public static String trimEnd (@Nullable final String sSrc, @Nonnegative final int nCount)
    {
      if (nCount <= 0)
        return sSrc;
      return getLength (sSrc) <= nCount ? "" : sSrc.substring (0, sSrc.length () - nCount);
    }
docs: Trim the passed tail from the source value. If the source value does not end
  with the passed tail, nothing happens.
  
  @param sSrc
  The input source string
  @param nCount
  The number of characters to trim at the end.
  @return The trimmed string, or an empty string if nCount is &ge; the length
  of the source string