From: Austin Ziegler Date: 2003-01-15T04:49:55+09:00 Subject: Re: RCR: String#indent(n) I need to check, but I think that most of what you're looking for is in Text::Format. -a -- austin ziegler Sent from my Treo -----Original Message----- From: Gavin Sinclair Date: 03.1.13 22.27 To: ruby-talk@ruby-lang.org (ruby-talk ML) Subj: RCR: String#indent(n) Rubyists, I think a fine companion for String#ljust, String#rjust and String#center would be String#indent. For example: text = < true I must go down to the sea again The lonely sea and sky And all I want is a tall ship And a star to steer me by EOT text.indent("-+- ") == < true -+- I must go down to the sea again -+- The lonely sea and sky -+- And all I want is a tall ship -+- And a star to steer me by EOT Note that the above code is demonstration only; I haven't run it. It would probably be better in hindsight to move #ljust et al into a separate module (StringFormat, say) with which individual objects can be extended at will. Then more and more utility methods can be added without bloating String. Gavin