Sha256: 9bb838acd64f308166869e4fa5ebaa7b95222fcb0a4784b91578bc4c0fb782e1

Contents?: true

Size: 108 Bytes

Versions: 2

Compression:

Stored size: 108 Bytes

Contents

class String
  def wrap(width)
    gsub(/(.{1,#{width}})( +|$\n?)|(.{1,#{width}})/, "\\1\\3\n")
  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
space-0.0.3 lib/core_ext/string.rb
space-0.0.2 lib/core_ext/string.rb