ammonite.terminal.Ansi

Str

case class Str extends Product with Serializable

Represents a structured Ansi-colored string, containing both Colors and string Content, with operations that let you easily manipulate the string while keeping colors sane.

Maintains an invariant that it is always in a "collapsed" state: the fragments never have any consecutive Content nodes, or any consecutive redundant Color nodes.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Str
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def ++(other: Str): Str

  5. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  6. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. val fragments: Vector[Frag]

  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. lazy val length: Int

  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  18. def overlay(overlayColor: Color, start: Int, end: Int): Str

    Overlays the desired color over the specified range of the Ansi.Str.

  19. lazy val plainText: Vector[Char]

  20. def query(targetScreenLength: Int): (State, Int, Int)

    Tells you the state the desired visible-character index into the string, and how far into the sequence of segments this happens

  21. lazy val render: Vector[Char]

  22. def selfCheck(): Unit

  23. def splitAt(index: Int): (Str, Str)

    Splits this Str at the specified plaintext index, producing two children that when rendered will result in the same visual output.

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. lazy val toString: String

    Definition Classes
    Str → AnyRef → Any
  26. def transform(f: (Frag, State, State, Int, Int) ⇒ Seq[Frag]): Str

    Runs a function over the sequence of Frags and States to transform it into a new sequence of Frags.

    Runs a function over the sequence of Frags and States to transform it into a new sequence of Frags. The callback returns 0 or more Frags per call, which get stitched together into the final result, with consecutive Contents collapsed and redundant Colors removed

  27. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def walk(f: (Frag, State, Int, Int) ⇒ Boolean): (State, Int, Int)

    Walk over the sequence of Frags; the callback gets called with each frag, together with some computed metadata about the ansi-State and screen length.

    Walk over the sequence of Frags; the callback gets called with each frag, together with some computed metadata about the ansi-State and screen length. In response, it returns a boolean that determines whether or not to continue walking or bail early.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped