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;
}

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 ; }
converts a sequence of java characters to a sequence of unicode code points .
