code: @SuppressWarnings("deprecation")
      public static CharStream of(final CharSequence str, final int startIndex, final int endIndex) {
          N.checkFromToIndex(startIndex, endIndex, N.len(str));
  
          if (N.isNullOrEmpty(str)) {
              return empty();
          }
  
          if (str instanceof String) {
              return of(StringUtil.getCharsForReadOnly((String) str), startIndex, endIndex);
          }
  
          final CharIteratorEx iter = new CharIteratorEx() {
              private int cursor = startIndex;
  
              @Override
              public boolean hasNext() {
                  return cursor < endIndex;
              }
  
              @Override
              public char nextChar() {
                  return str.charAt(cursor++);
              }
  
              @Override
              public long count() {
                  return endIndex - cursor;
              }
          };
  
          return new IteratorCharStream(iter);
      }
docs: Takes the chars in the specified String as the elements of the Stream
  
  @param str
  @param startIndex
  @param endIndex
  @return