# File lib/facet/string/line_wrap.rb, line 14 def line_wrap(width) s = gsub(/\t/,' '*4) # tabs default to 4 spaces. s = s.gsub(/\n/,' ') r = s.scan( /.{1,#{width}}/ ) r.join("\n") << "\n" end