code: public static int[] stringToCodePoints(final String s) {
          final int m = s.codePointCount(0, s.length());
          final int[] codePoints = new int[m];
          int j = 0;
          for (int offset = 0; offset < s.length();) {
              final int codepoint = s.codePointAt(offset);
              codePoints[j++] = codepoint;
              offset += Character.charCount(codepoint);
          }
          return codePoints;
      }
docs: Create Unicode code points from a String.
  
  @param s
  a String to convert to an Unicode code point array
  
  @return the corresponding array of integers representing Unicode code
  points