From: Gavin Sinclair Date: 2003-01-14T12:26:45+09:00 Subject: 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