instance method String#each_byte

each_byte {|byte| ... } -> self[permalink][rdoc][edit]
each_byte -> Enumerator

文字列の各バイトに対して繰り返します。



"str".each_byte do |byte|
  p byte
end
    # => 115
    # => 116
    # => 114

"".each_byte do |byte|
  p byte
end
    # => 227
    # => 129
    # => 130

[SEE_ALSO] String#bytes