code: public UTF8String trim(UTF8String trimString) {
      if (trimString != null) {
        return trimLeft(trimString).trimRight(trimString);
      } else {
        return null;
      }
    }
docs: Based on the given trim string, trim this string starting from both ends
  This method searches for each character in the source string, removes the character if it is
  found in the trim string, stops at the first not found. It calls the trimLeft first, then
  trimRight. It returns a new string in which both ends trim characters have been removed.
  @param trimString the trim character string