Object/Class

fansi

Str

Related Docs: class Str | package fansi

Permalink

object Str

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Str
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type State = Long

    Permalink

    An fansi.Str's colors array is filled with Long, each representing the ANSI state of one character encoded in its bits.

    An fansi.Str's colors array is filled with Long, each representing the ANSI state of one character encoded in its bits. Each Attr belongs to a Category that occupies a range of bits within each long:

    61... 55 54 53 52 51 .... 31 30 29 28 27 26 25 ..... 6 5 4 3 2 1 0 |--------| |-----------------------| |-----------------------| | | |bold | | | | |reversed | | | |underlined | | |foreground-color | |background-color |unused

    The 0000 0000 0000 0000 long corresponds to plain text with no decoration

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def Sanitize(raw: CharSequence): Str

    Permalink

    Shorthand constructor with ErrorMode.Sanitize

  5. def Strip(raw: CharSequence): Str

    Permalink

    Shorthand constructor with ErrorMode.Strip

  6. def Throw(raw: CharSequence): Str

    Permalink

    Shorthand constructor with ErrorMode.Throw

  7. val ansiRegex: Pattern

    Permalink

    Regex that can be used to identify Ansi escape patterns in a string.

    Regex that can be used to identify Ansi escape patterns in a string.

    Found from: http://stackoverflow.com/a/33925425/871202

    Which references:

    http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf

    Section 5.4: Control Sequences

  8. def apply(args: Str*): Str

    Permalink
  9. def apply(raw: CharSequence, errorMode: ErrorMode = ErrorMode.Throw): Str

    Permalink

    Creates an fansi.Str from a non-fansi java.lang.String or other CharSequence.

    Creates an fansi.Str from a non-fansi java.lang.String or other CharSequence.

    Note that this method is implicit, meaning you can pass in a java.lang.String anywhere an fansi.Str is required and it will be automatically parsed and converted for you.

    errorMode

    Used to control what kind of behavior you get if the input CharSequence contains an Ansi escape not recognized by Fansi as a valid color.

  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. def clone(): AnyRef

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

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def fromArrays(chars: Array[Char], colors: Array[State]): Str

    Permalink

    Constructs a fansi.Str from an array of characters and an array of colors.

    Constructs a fansi.Str from an array of characters and an array of colors. Performs a defensive copy of the arrays, and validates that they both have the same length

    Useful together with getChars and getColors if you want to do manual work on the two mutable arrays before stitching them back together into one immutable fansi.Str

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. implicit def implicitApply(raw: CharSequence): Str

    Permalink

    Make the construction of fansi.Strs from Strings and other CharSequences automatic

  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def join(args: Iterable[Str], sep: Str = fansi.Str("")): Str

    Permalink
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped