Sha256: 053cc7247a62ee0c6db97bfb8ebc06f3f62c48fe8ee6341d36b4308283c69d1a

Contents?: true

Size: 406 Bytes

Versions: 2

Compression:

Stored size: 406 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

2 entries across 2 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 demo/core/string/fold.md
facets-3.1.0 demo/core/string/fold.md