one space longer than the word : Justify Center « String « Ruby






one space longer than the word


"four".center(5)                      # => "four "
"four".center(6)                      # => " four "

 








Related examples in the same category

1.Center a string
2.Center a string by filling
3.play both ends to the middle
4.use center to create a comment: