str.each_byte {|fixnum| block } â str
str.each_byte â an_enumerator
str.each_byte â an_enumerator
Instance Public methods
Passes each byte in str to the given block, or returns an enumerator if no block is given.
1 | "hello" .each_byte {|c| print c, ' ' } |
produces:
1 | 104 101 108 108 111 |
Please login to continue.