package ansi-parse

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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

type 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
type t =
  1. | Esc of style list
  2. | Reset
  3. | Text of string
val parse : Stdlib.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.

val parse_str : string -> t list

Analogous to parse.

module Private : sig ... end

For internal use only.

OCaml

Innovation. Community. Security.