code: public static Slice trim(Slice utf8, int[] whiteSpaceCodePoints)
      {
          int start = firstNonMatchPosition(utf8, whiteSpaceCodePoints);
          int end = lastNonMatchPosition(utf8, start, whiteSpaceCodePoints);
          return utf8.slice(start, end - start);
      }
docs: Removes all white {@code whiteSpaceCodePoints} from the left and right side of the string.
  <p>
  Note: Invalid UTF-8 sequences are not trimmed.