code: public static String collectCodePoint(String string, CodePointFunction function)
      {
          int size = string.length();
          StringBuilder builder = new StringBuilder(size);
          for (int i = 0; i < size; )
          {
              int codePoint = string.codePointAt(i);
              builder.appendCodePoint(function.valueOf(codePoint));
              i += Character.charCount(codePoint);
          }
          return builder.toString();
      }
docs: Transform the int code point elements to a new string using the specified function {@code function}.
  
  @since 7.0