summaryrefslogtreecommitdiff
path: root/doc/string/bytes.rdoc
blob: a9e89f1cd1a733d667c41a39f588580757b7727b (plain)
1
2
3
4
5
6
Returns an array of the bytes in +self+:

  'hello'.bytes # => [104, 101, 108, 108, 111]
  'тест'.bytes  # => [209, 130, 208, 181, 209, 129, 209, 130]
  'こんにちは'.bytes
  # => [227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]