sealed abstract class Cord extends AnyRef
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:
- https://ecc-comp.blogspot.co.uk/2015/05/a-brief-glance-at-how-5-text-editors.html - https://pavelfatin.com/typing-with-pleasure/
- Source
- Cord.scala
- Alphabetic
- By Inheritance
- Cord
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
++(o: Cord): Cord
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. -
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
reset: 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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
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
- Cord → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()