Sha256: 89b20bcfd659cffc3c89da12e331072cd0565dc5fb50a594def7f6927dfdb834

Contents?: true

Size: 392 Bytes

Versions: 7

Compression:

Stored size: 392 Bytes

Contents

== String#fold

  require 'facets/string/fold'

  s = "This is\na test.\n\nIt clumps\nlines of text."
  o = "This is a test.\n\nIt clumps lines of text."
  s.fold.assert == o

leave spaces

  s = "This is\na test.\n\n  This is pre.\n  Leave alone.\n\nIt clumps\nlines of text."
  o = "This is a test.\n\n  This is pre.\n  Leave alone.\n\nIt clumps lines of text."
  s.fold(true).assert == o

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
facets-3.0.0 demo/core/string/fold.rdoc
facets-2.9.3 qed/core/string/fold.rdoc
facets-2.9.2 qed/core/string/fold.rdoc
facets-2.9.1 qed/core/string/fold.rdoc
facets-2.9.0 qed/core/string/fold.rdoc
facets-2.9.0.pre.2 qed/core/string/fold.rdoc
facets-2.9.0.pre.1 qed/core/string/fold.rdoc