From: ruby rails Date: 2011-08-31T20:00:40+09:00 Subject: Prepend a character to a string in ruby 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 -- Posted via http://www.ruby-forum.com/.