Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
append a string with the << method: : String Concatenation « String « Ruby
Ruby
String
String Concatenation
append a string with the << method:
puts
"Hello, "
<<
"Matz!"
Related examples in the same category
1.
Append one string to another with the + method:
2.
Concatenate (join) strings together, using a +
3.
Using the + symbol concatenates the two strings "
4.
inserting value of a variable in a string
5.
Push several strings into one
6.
Encode command in string