W3cubDocs

/Scala 2.13 Library

Package scala.io

package io

Type Members

trait AnsiColor extends AnyRef

ANSI escape codes providing control over text formatting and color on supporting text terminals.

ANSI Style and Control Codes

This group of escape codes provides control over text styling. For example, to turn on reverse video with bold and then turn off all styling embed these codes,

import io.AnsiColor._

object ColorDemo extends App {

  println(s"${REVERSED}${BOLD}Hello 1979!${RESET}")
}

Foreground and Background Colors

Embedding ANSI color codes in text output will control the text foreground and background colors.

Foreground Background
BLACK BLACK_B
RED RED_B
GREEN GREEN_B
YELLOW YELLOW_B
BLUE BLUE_B
MAGENTA MAGENTA_B
CYAN CYAN_B
WHITE WHITE_B

class BufferedSource extends Source

class Codec extends AnyRef

trait LowPriorityCodecImplicits extends AnyRef

abstract class Source extends Iterator[Char] with Closeable

An iterable representation of source data. It may be reset with the optional reset method.

Subclasses must supply the underlying iterator.

Error handling may be customized by overriding the report method.

The current input and position, as well as the next character methods delegate to the positioner.

The default positioner encodes line and column numbers in the position passed to report. This behavior can be changed by supplying a custom positioner.

Value Members

object AnsiColor extends AnsiColor

object Codec extends LowPriorityCodecImplicits

object Source

object StdIn extends StdIn

© 2002-2019 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://www.scala-lang.org/api/2.13.0/scala/io/index.html