diff options
| author | Federico Igne <undyamon@disroot.org> | 2024-01-23 18:08:56 +0100 |
|---|---|---|
| committer | Federico Igne <undyamon@disroot.org> | 2024-01-23 18:08:56 +0100 |
| commit | 482e8b80fa66e328e252567c915f5e96e727f7cf (patch) | |
| tree | 4b712f227ae1926a744f2dc2e2df85ece3da1e43 /lib/util.ml | |
| parent | 7d009e0ca4a1af10cc6d31fb5982e38dcab9ee71 (diff) | |
| download | sandy-482e8b80fa66e328e252567c915f5e96e727f7cf.tar.gz sandy-482e8b80fa66e328e252567c915f5e96e727f7cf.zip | |
feat: add simple status bar with timed status message support
Diffstat (limited to 'lib/util.ml')
| -rw-r--r-- | lib/util.ml | 7 |
1 files changed, 7 insertions, 0 deletions
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 = | |||
| 24 | loop 0 () | 24 | loop 0 () |
| 25 | in | 25 | in |
| 26 | traverse b |> run | 26 | traverse b |> run |
| 27 | |||
| 28 | (** Turn a string into a sequence. | ||
| 29 | |||
| 30 | @param s the input string. | ||
| 31 | @return a sequence of bytes. *) | ||
| 32 | let sequence_of_string (s : string) : char Sequence.t = | ||
| 33 | s |> String.to_list |> Sequence.of_list | ||
