package ansi-parse

  1. Overview
  2. Docs

Module Ansiparse.ConcreteSource

The Concrete module is concerned with converting between raw text and a "concrete" list representation of the items in the text.

Sourcetype style =
  1. | Bold
  2. | Faint
  3. | Italic
  4. | Underline
  5. | Inverse
  6. | Hidden
  7. | Strike
  8. | Fore of color
  9. | Back of color
  10. | Unknown of int
Sourcetype t =
  1. | Esc of style list
  2. | Reset
  3. | Text of string
Sourceval parse : in_channel -> t list

Picture the text as ANSI escape sequences, interspersed with normal text. parse converts the raw characters to a t list. The 'reset' escape converts to Reset; all others convert to Esc styles, and text to Text str.

Sourceval parse_str : string -> t list

Analogous to parse.

Sourcemodule Private : sig ... end

For internal use only.

OCaml

Innovation. Community. Security.