mirror of
https://github.com/chshersh/github-tui.git
synced 2024-09-11 10:35:35 +03:00
10 lines
310 B
OCaml
10 lines
310 B
OCaml
let unlines : string list -> string = String.concat "\n"
|
|
|
|
let graphemes_len =
|
|
Uuseg_string.fold_utf_8 `Grapheme_cluster (fun len _ -> len + 1) 0
|
|
|
|
let repeat_txt n txt = String.concat "" (List.init n (fun _ -> txt))
|
|
|
|
let fill_right (n : int) (s : string) : string =
|
|
s ^ repeat_txt (n - graphemes_len s) " "
|