Use another character besides the default space character if you'd like : Justify Right « String « Ruby
- Ruby
- String
- Justify Right
Use another character besides the default space character if you'd like
title = "Love's Labours Lost"
puts title.rjust( 21, "-" )
Related examples in the same category