From: Dominic Sisneros Date: 2011-09-01T01:29:24+09:00 Subject: Re: Prepend a character to a string in ruby --20cf30363f9181c31e04abcfa110 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Aug 31, 2011 at 5:00 AM, ruby rails wrote: > Hi, > > I am trying to insert a character to a string at the beginning of a > string. How is it possible in ruby. > I tried using > s.times do |s| > @space_availability+="0" > end > But this would add at the end of the string. > The @space_availability is a string with 1's and 0's. I need to add 0's > at the beginning of this string. > I am a newbie in ruby > It is coming: String#prepend has been accepted as revision r29120. > > -- > Posted via http://www.ruby-forum.com/. > > --20cf30363f9181c31e04abcfa110--