mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
9 lines
375 B
Plaintext
9 lines
375 B
Plaintext
Returns an array of the bytes in +self+:
|
|
|
|
'hello'.bytes # => [104, 101, 108, 108, 111]
|
|
'Привет'.bytes # => [208, 159, 209, 128, 208, 184, 208, 178, 208, 181, 209, 130]
|
|
'こんにちは'.bytes
|
|
# => [227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]
|
|
|
|
Related: see {Converting to Non-String}[rdoc-ref:String@Converting+to+Non--5CString].
|