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
Menu
use % for format printing : String format « String « Ruby
Ruby
String
String format
use % for format printing
puts
"%s, %s!"
% [
"Hello"
,
"Matz"
]
Related examples in the same category
1.
Substituting Variables Into an Existing String
2.
Replace string with float
3.
Changing the Case of a String
4.
Center, left justify and right justify string