Skip to main content
Say What???
Ain't got a slogan...

Main menu

  • Home
  • Archived Articles

You are here

Home » Ruby 1.8 Method of the Day Archive

String.+

Kelly McCauley's picture
published by Kelly McCauley on Wed, 10/27/2010 - 07:11

Signature

string + other_string   #=> new_string

string.+ returns a new string that is composed of string concatenated with other_string.

Examples

"foo" + "bar"           #=> "foobar"
"foo".+("bar")          #=> "foobar"

x = 'foo'
y = 'bar'
z = 'baz'
x + ' ' + z + ' ' + y   #=> "foo baz bar"

Documentation Reference

www.ruby-doc.org : String.+

‹ String.* up String.<=> ›
  • Log in to post comments

Ruby 1.8 Method of the Day Archive

  • Array.&
  • Array.+
  • Array.-
  • Array.<< and Array.push
  • Array.[] and Array.slice
  • Array.[]=
  • Array.abbrev
  • Array.assoc
  • Array.compact and Array.compact!
  • Array.delete
  • Array.delete_if
  • Array.fetch
  • Array.first
  • Array.last
  • Array.map and Array.collect
  • Array.map! and Array.collect!
  • Array.nitems
  • Array.pop
  • Array.rassoc
  • Array.reject
  • Array.reject!
  • Array.slice!
  • Float.ceil
  • Float.floor
  • Float.truncate
  • Integer.downto
  • Integer.times
  • Integer.upto
  • String.%
  • String.*
  • String.+
  • String.<=>
  • String.==
  • String.=~
  • String.[]
  • String.[]=
  • String.casecmp
  • String.center
  • String.count
  • String.delete
  • String.delete!
  • String.gsub
  • String.gsub!
  • String.hex
  • String.index
  • String.insert
  • String.inspect
  • String.length
  • String.ljust
  • String.lstrip
  • String.lstrip!
  • String.next
  • String.reverse
  • String.rindex
  • String.rjust
  • String.rstrip
  • String.rstrip!
  • String.scan
  • String.strip
  • String.strip!
  • String.sub
  • String.to_sym

User login

  • Request new password

Syndicate

Subscribe to Syndicate

Content Copyright © Kelly McCauley, All Rights Reserved. Trademarks and copyrights are owned by their respective owners. Comments are owned by the commenter.