From: Robert Klemme Date: 2004-10-25T17:29:06+09:00 Subject: Re: [rcr] String#first / String#last "trans. (T. Onoma)" schrieb im Newsbeitrag news:200410250001.59113.transami@runbox.com... > 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 > writes: > | |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