R
Robert Klemme
trans. (T. Onoma) said:On Sunday 24 October 2004 11:54 pm, Yukihiro Matsumoto wrote:
| Hi,
|
| In message "Re: [rcr] String#first / String#last"
|
| on Mon, 25 Oct 2004 09:18:51 +0900, Hal Fulton
| |I think I'd be opposed to that. But adding a to_a might be good -- I
| |frequently do a gratuitous split operation for that purpose.
|
| It already has "to_a" which works line-wise. Perhaps something called
| "explode" in other language is what you want.
Believe their is an RCR for #chars
def chars
split(//)
end
This does not yield characters but strings with length 1. Note also that
there is String#each_byte which is often sufficient.
Kind regards
robert