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
play both ends to the middle : Justify Center « String « Ruby
Ruby
String
Justify Center
play both ends to the middle
title =
"Love's Labours Lost"
title.center 23 title.center 23,
"-"
Related examples in the same category
1.
Center a string
2.
Center a string by filling
3.
use center to create a comment:
4.
one space longer than the word