Dmitri Colebatch wrote:
> Tom Sawyer wrote:
> 
>> On Wednesday 15 January 2003 10:08 pm, Gavin Sinclair wrote:
>>
>>>   s = %Q{
>>>     hi
>>>       how are you?
>>>   }.tabto(0)
>>
>>
>>
>> very cool Gavin, unfortunately i can't use that since i have all my 
>> tabs converted to spaces by my editor. is there a spaces version perhaps?

It is the spaces version, just with a bad name. I use spaces to emulate 
hard tabs, too.

> (untested)
> 
>     .sub!(/^ *//)
> 
> would do the trick yes?

Nope, #tabto preserves relative indentation of lines. I probably should 
have called it something else, like "indent_to" or "indent_block".

If anyone has a better name, please put add it to:

http://www.rubygarden.org/ruby?StringFormattingFunctions