APIdock / Ruby
/
Browse About
method

chars

v1_9_3_125 - Show latest stable - Class: StringIO
chars()
public

See IO#each_char.

static VALUE
strio_each_char(VALUE self)
{
    VALUE c;

    RETURN_ENUMERATOR(self, 0, 0);

    while (!NIL_P(c = strio_getc(self))) {
        rb_yield(c);
    }
    return self;
}

Related methods

  • Instance methods
  • <<
  • binmode
  • bytes
  • chars
  • close
  • close_read
  • close_write
  • closed?
  • closed_read?
  • closed_write?
  • codepoints
  • each
  • each_byte
  • each_char
  • each_codepoint
  • each_line
  • eof
  • eof?
  • external_encoding
  • fcntl
  • fileno
  • flush
  • fsync
  • getbyte
  • getc
  • gets
  • initialize_copy
  • internal_encoding
  • isatty
  • length
  • lineno
  • lineno=
  • lines
  • pid
  • pos
  • pos=
  • print
  • printf
  • putc
  • puts
  • read
  • read_nonblock
  • readbyte
  • readchar
  • readline
  • readlines
  • readpartial
  • reopen
  • rewind
  • seek
  • set_encoding
  • size
  • string
  • string=
  • sync
  • sync=
  • sysread
  • syswrite
  • tell
  • truncate
  • tty?
  • ungetbyte
  • ungetc
  • write
  • write_nonblock
  • Class methods
  • new
  • open
APIdock API Documentation Browser

© 2026 APIdock