each_char() public

Calls the given block once for each character in ios, passing the character as an argument. The stream must be opened for reading or an IOError will be raised. Multibyte characters are dealt with according to $KCODE.

   f = File.new("testfile")
   f.each_char {|c| print c, ' ' }   #=> #<File:testfile>
Show source
Register or log in to add new notes.