Marcel Molina Jr.
7/24/2007 8:43:00 PM
On Wed, Jul 25, 2007 at 05:40:01AM +0900, ed wrote:
> Under most languages it pays to use a StringBuffer of sorts.
>
> Is this true for Ruby, should one use a StringBuffer when appending
> many strings?
>
> If so, what is the string buffer called for Ruby?
Strings are mutable in ruby so you just use the << method to append to a
string. Don't, though, use + as that creates a new string.
'Foo' << 'Bar', etc
marcel
--
Marcel Molina Jr. <marcel@vernix.org>