mirror of
https://github.com/chshersh/github-tui.git
synced 2024-10-26 11:00:19 +03:00
9 lines
332 B
OCaml
9 lines
332 B
OCaml
let unlines : string list -> string = String.concat "\n"
|
|
|
|
(* Calculate the line of length using grapheme clusters and ignore ANSI formatting. *)
|
|
let width = Shape_the_term.width
|
|
let repeat_txt n txt = String.concat "" (List.init n (fun _ -> txt))
|
|
|
|
let fill_right (n : int) (s : string) : string =
|
|
s ^ repeat_txt (n - width s) " "
|