6 lines
91 B
Ruby
Raw Normal View History

2016-08-18 22:11:42 +03:00
class String
def undent
gsub(%r{^.{#{(slice(%r{^ +}) || '').length}}}, "")
end
end