text: public static int toCodePoints(char[] src, int srcOff, int srcLen, int[] dest, int destOff) {if (srcLen < 0) {throw new IllegalArgumentException("srcLen must be >= 0");}int codePointCount = 0;for (int i = 0; i < srcLen; ) {final int cp = Character.codePointAt(src, srcOff + i, srcOff + srcLen);final int charCount = Character.charCount(cp);dest[destOff + codePointCount++] = cp;i += charCount;}return codePointCount;}