play both ends to the middle : Justify Center « String « Ruby






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