ruby/doc/string/chars.rdoc
2025-07-08 13:26:58 -04:00

8 lines
334 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Returns an array of the characters in +self+:
'hello'.chars # => ["h", "e", "l", "l", "o"]
'тест'.chars # => ["т", "е", "с", "т"]
'こんにちは'.chars # => ["こ", "ん", "に", "ち", "は"]
''.chars # => []
Related: see {Converting to Non-String}[rdoc-ref:String@Converting+to+Non--5CString].