code: public static int codePointCount(CharSequence text, int start, int limit) {
          if (start < 0 || limit < start || limit > text.length()) {
              throw new IndexOutOfBoundsException("start (" + start +
                      ") or limit (" + limit +
                      ") invalid or out of range 0, " + text.length());
          }
  
          int len = limit - start;
          while (limit > start) {
              char ch = text.charAt(--limit);
              while (ch >= MIN_LOW_SURROGATE && ch <= MAX_LOW_SURROGATE && limit > start) {
                  ch = text.charAt(--limit);
                  if (ch >= MIN_HIGH_SURROGATE && ch <= MAX_HIGH_SURROGATE) {
                      --len;
                      break;
                  }
              }
          }
          return len;
      }
docs: Equivalent to the {@link Character#codePointCount(CharSequence, int, int)}
  method, for convenience.  Counts the number of code points in the range
  of text.
  @param text the characters to check
  @param start the start of the range
  @param limit the limit of the range
  @return the number of code points in the range