On Thu, 7 Jan 2010, Marc Heiler wrote:

> Since some time I have used this to prepend something to a string:
>
>  string = 'bc'
>  string[0,0] = 'a'
>
> Resulting in:
>
>  'abc'
>
> Then I recently wanted to append something to a string.
> Of course there exists the << method already
>
>  string = 'ab'
>  string << 'c'
>
> But there does not seem to be a way via []
> Using
>
>  string[-1,0] = 'c'
>
> will add at the position before. Is it true that with the
> [] method on string one can not append just one character to it?


string[string.size,0]='c' works

But I think string << 'c' is clearer

YMMV