From: "Jesús Gabriel y Galán" Date: 2008-12-21T02:25:17+09:00 Subject: Re: add text at beginning of a string On Sat, Dec 20, 2008 at 6:13 PM, Fernando Perez wrote: > Hi, > > Sorry for this silly question, but I don't remember how to insert text > to the beginning of a string. It's like the concatenate (or <<) operator > but it adds text before. I recommend studying this page, it's good to be familiar with the methods in class String: http://ruby-doc.org/core/classes/String.html The one you are looking for is: irb(main):001:0> s = "world" => "world" irb(main):002:0> s.insert(0, "hello ") => "hello world" irb(main):003:0> s => "hello world" Hope this helps, Jesus.