On Dec 20, 2005, at 6:32 PM, Christer Nilsson wrote:
> Strange it is not a part of Ruby as the char is the most natural  
> part of
> a string.

I don't think that is true.  The semantics of each_byte are quite clear
but exactly what is a character?  In some encodings
one byte is the same as one character but in other encodings it might
be two bytes or in others in might be a variable number of bytes.

Iterating by 'character' only has meaning with respect to a character  
set
encoding and a Ruby string generally doesn't have that sort of  
information.

I think it is has been said before but, a Ruby string is more like an
array of bytes than a sequence of code points in an (implicit)  
character set.

Gary Wright