summaryrefslogtreecommitdiff
path: root/lib/util.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.ml')
-rw-r--r--lib/util.ml7
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. *)
32let sequence_of_string (s : string) : char Sequence.t =
33 s |> String.to_list |> Sequence.of_list