From 482e8b80fa66e328e252567c915f5e96e727f7cf Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Tue, 23 Jan 2024 18:08:56 +0100 Subject: feat: add simple status bar with timed status message support --- lib/util.ml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/util.ml') diff --git a/lib/util.ml b/lib/util.ml index 9ad3b59..b86119b 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -24,3 +24,10 @@ let sequence_of_bytes (b : Bytes.t) : char Sequence.t = loop 0 () in traverse b |> run + +(** Turn a string into a sequence. + + @param s the input string. + @return a sequence of bytes. *) +let sequence_of_string (s : string) : char Sequence.t = + s |> String.to_list |> Sequence.of_list -- cgit v1.2.3