Cord

sealed abstract
class Cord

A Cord is a purely functional data structure for efficiently creating a String from smaller parts, useful for printing ADTs that must write out their contents into a text format.

A z interpolator is available for building String from literals, using the Show typeclass to populate each "hole", and a cord interpolator for building Cord instances.

If a more efficient solution is required to write a large String to a network socket or file, consider https://github.com/scalaz/scalaz/issues/1797

If you require a general text manipulation data structure, consider using FingerTree or creating a custom structure to resemble that used by the popular text editors:

Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

final
def ++(o: Cord): Cord

Strict evaluation variant of Monoid.append.

Strict evaluation variant of Monoid.append.

final
def ::(o: Cord): Cord

Strict evaluation variant of Monoid.append that associates to the right, therefore building more optimal data structures.

Strict evaluation variant of Monoid.append that associates to the right, therefore building more optimal data structures.

final
def reset: Cord

Evaluates and stores the String represented by this, returning an equivalent Cord.

Evaluates and stores the String represented by this, returning an equivalent Cord.

final
def shows: String

Explicitly construct the output String represented by this Cord

Explicitly construct the output String represented by this Cord

final override
def toString: String

LEGACY: scalaz <= 7.2 users expect toString to return the underlying String

LEGACY: scalaz <= 7.2 users expect toString to return the underlying String

Definition Classes
Any