Someone on PerlMonks taught me a neat trick.   A regex split about
nothing returns an array of one-character strings.  It's true for Ruby
as well ...   So these indexing routines are really simple.

some_string.split(//).each { |c| 
  ...
}

# or ... some_string.split(//)[5]



Carlos> It is a Ruby feature :). Indices in strings are bytes, not
chars. For the
Carlos> moment, you must develop your own indexing routines for UTF-8 strings
Carlos> (notice that String#[/regex/] works, because regexes are UTF-8 aware).