code: protected static String trimEnd(final String value, final char trimChar) {
          int stopDex = value.length() - 1;
          while (stopDex > 0 && value.charAt(stopDex) == trimChar) {
              stopDex--;
          }
  
          return stopDex == value.length() - 1 ? value : value.substring(stopDex);
      }
docs: Trims the specified character from the end of a string.
  
  @param value
  A <code>String</code> that represents the string to trim.
  @param trimChar
  The character to trim from the end of the string.
  
  @return The string with the specified character trimmed from the end.