public static int getNextCodePointOffset(@NotNull Document document, int offset) {
    return offset + (isSurrogatePair(document, offset) ? 2 : 1);
  }
public static int getNextCodePointOffset(@NotNull Document document, int offset)