mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
deploy: 95e96fb5e1
This commit is contained in:
parent
8c36e7411c
commit
9545439907
2 changed files with 4 additions and 1 deletions
3
dev/containers/CCFormat/ANSI_codes/index.html
Normal file
3
dev/containers/CCFormat/ANSI_codes/index.html
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>ANSI_codes (containers.CCFormat.ANSI_codes)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">containers</a> » <a href="../index.html">CCFormat</a> » ANSI_codes</nav><h1>Module <code>CCFormat.ANSI_codes</code></h1><p>ANSI escape codes. This contains lower level functions for them.</p><dl><dt>since</dt><dd>NEXT_RELEASE</dd></dl></header><dl><dt class="spec type" id="type-color"><a href="#type-color" class="anchor"></a><code><span class="keyword">type</span> color</code> = <code>[ </code><table class="variant"><tr id="type-color.Black" class="anchored"><td class="def constructor"><a href="#type-color.Black" class="anchor"></a><code>| </code><code>`Black</code></td></tr><tr id="type-color.Red" class="anchored"><td class="def constructor"><a href="#type-color.Red" class="anchor"></a><code>| </code><code>`Red</code></td></tr><tr id="type-color.Yellow" class="anchored"><td class="def constructor"><a href="#type-color.Yellow" class="anchor"></a><code>| </code><code>`Yellow</code></td></tr><tr id="type-color.Green" class="anchored"><td class="def constructor"><a href="#type-color.Green" class="anchor"></a><code>| </code><code>`Green</code></td></tr><tr id="type-color.Blue" class="anchored"><td class="def constructor"><a href="#type-color.Blue" class="anchor"></a><code>| </code><code>`Blue</code></td></tr><tr id="type-color.Magenta" class="anchored"><td class="def constructor"><a href="#type-color.Magenta" class="anchor"></a><code>| </code><code>`Magenta</code></td></tr><tr id="type-color.Cyan" class="anchored"><td class="def constructor"><a href="#type-color.Cyan" class="anchor"></a><code>| </code><code>`Cyan</code></td></tr><tr id="type-color.White" class="anchored"><td class="def constructor"><a href="#type-color.White" class="anchor"></a><code>| </code><code>`White</code></td></tr></table><code> ]</code></dt><dd><p>An ANSI color</p></dd></dl><dl><dt class="spec type" id="type-style"><a href="#type-style" class="anchor"></a><code><span class="keyword">type</span> style</code> = <code>[ </code><table class="variant"><tr id="type-style.FG" class="anchored"><td class="def constructor"><a href="#type-style.FG" class="anchor"></a><code>| </code><code>`FG <span class="keyword">of</span> <a href="index.html#type-color">color</a></code></td><td class="doc"><p>foreground</p></td></tr><tr id="type-style.BG" class="anchored"><td class="def constructor"><a href="#type-style.BG" class="anchor"></a><code>| </code><code>`BG <span class="keyword">of</span> <a href="index.html#type-color">color</a></code></td><td class="doc"><p>background</p></td></tr><tr id="type-style.Bold" class="anchored"><td class="def constructor"><a href="#type-style.Bold" class="anchor"></a><code>| </code><code>`Bold</code></td></tr><tr id="type-style.Reset" class="anchored"><td class="def constructor"><a href="#type-style.Reset" class="anchor"></a><code>| </code><code>`Reset</code></td></tr></table><code> ]</code></dt><dd><p>A style. Styles can be composed in a list.</p></dd></dl><dl><dt class="spec value" id="val-clear_line"><a href="#val-clear_line" class="anchor"></a><code><span class="keyword">val</span> clear_line : string</code></dt><dd><p><code>clear_line</code> is an escape code to clear the current line. It is very useful for progress bars; for example:</p><pre><code class="ml">let pp_progress i =
|
||||||
|
Printf.printf "%sprogress at %d%!" ANSI_codes.clear_line i</code></pre><p>if called repeatedly this will print successive progress messages on a single line.</p></dd></dl><dl><dt class="spec value" id="val-reset"><a href="#val-reset" class="anchor"></a><code><span class="keyword">val</span> reset : string</code></dt><dd><p>The escape code to reset style (colors, bold, etc.)</p></dd></dl><dl><dt class="spec value" id="val-string_of_style"><a href="#val-string_of_style" class="anchor"></a><code><span class="keyword">val</span> string_of_style : <a href="index.html#type-style">style</a> <span>-></span> string</code></dt><dd><p><code>string_of_style st</code> is an escape code to set the current style to <code>st</code>. It can be printed as is on any output that is a compatible terminal.</p></dd></dl><dl><dt class="spec value" id="val-string_of_style_list"><a href="#val-string_of_style_list" class="anchor"></a><code><span class="keyword">val</span> string_of_style_list : <span><a href="index.html#type-style">style</a> list</span> <span>-></span> string</code></dt><dd><p><code>string_of_style_list styles</code> is an escape code for multiple styles at once. For example <code>string_of_style_list ANSI_codes.([`FG `Red; `BG `Green; `Bold])</code> is a very shiny style.</p></dd></dl></div></body></html>
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue