package terminal_size

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

Source file terminal_size.ml

1
2
3
4
5
6
7
8
9
10
11
external get : unit -> (int * int) option = "ocaml_terminal_size_get"

let get_rows () =
  match get () with
  | Some (rows, _) -> Some rows
  | None -> None

let get_columns () =
  match get () with
  | Some (_, columns) -> Some columns
  | None -> None