David Vallner
10/18/2006 11:47:00 PM
Gavin Kistner wrote:
> Strings in Ruby are, as you say, series of 8-bit bytes. The String#[]
> operator when called with a single integer index returns the numeric
> value of the requested byte:
>
Reputedly about to change in Ruby 2, indexing a String will return a
single-character string. I think there'll be some more clean separation
between methods operating on a String as a (possibly Unicode) text
string or as binary data. I'm still personally not quite happy with the
semantics of Strings being overloaded like this, but it's probably the
most compatible way.
David Vallner