From: Warren Brown Date: 2004-08-13T04:23:48+09:00 Subject: Re: How about a String#chars method? Ara, > something like this > > ~ > cat b.rb > class String > def chars width = 1 > unpack "a#{ width }" * (size / width + (size % width == 0 ? 0 : 1)) > end > end I wish it were that easy, but multi-byte character sets are not always fixed-width. For example, UTF-8 characters can be anywhere from one byte to (theoretically) six bytes long. So the multi-byte handling would have to be a little more sophisticated. :o( - Warren Brown