object EscHelpers
- Alphabetic
- By Inheritance
- EscHelpers
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final val ESC: Char('\u001B')
Escape character, used to introduce an escape sequence.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def cursorPosition(s: String): Int
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hasEscapeSequence(s: String): Boolean
Returns true if the string contains the ESC character.
Returns true if the string contains the ESC character.
TODO - this should handle raw CSI (not used much)
- 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()
- def removeEscapeSequences(s: String): String
Returns the string
s
with escape sequences removed.Returns the string
s
with escape sequences removed. An escape sequence starts with the ESC character (decimal value 27) and ends with an escape terminator.- See also
isEscapeTerminator
- def strip(bytes: Array[Byte], stripAnsi: Boolean, stripColor: Boolean): (Array[Byte], Int)
Strips ansi escape and color codes from an input string.
Strips ansi escape and color codes from an input string.
- bytes
the input bytes
- stripAnsi
toggles whether or not to remove general ansi escape codes
- stripColor
toggles whether or not to remove ansi color codes
- returns
a string with the escape and color codes removed depending on the input parameter along with the length of the output string (which may be smaller than the returned array)
- def stripColorsAndMoves(s: String): String
Removes the ansi escape sequences from a string and makes a best attempt at calculating any ansi moves by hand.
Removes the ansi escape sequences from a string and makes a best attempt at calculating any ansi moves by hand. For example, if the string contains a backspace character followed by a character, the output string would replace the character preceding the backspaces with the character proceding it. This is in contrast to
strip
which just removes all ansi codes entirely.- s
the input string
- returns
a string containing the original characters of the input stream with the ansi escape codes removed.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def stripMoves(s: String): String
- Annotations
- @deprecated
- Deprecated
(Since version 1.4.2) use EscHelpers.strip