Use more than one character the sequence will be repeated : Justify Right « String « Ruby






Use more than one character the sequence will be repeated


title = "Love's Labours Lost"
puts title.rjust 25, "->"

 








Related examples in the same category

1.Use another character besides the default space character if you'd like
2.Add to both sides
3.Justify at both sides