Mercurial > hg > compilers
diff lib/bytes.ml @ 0:bfdcc3820b32
Basis
author | Mike Spivey <mike@cs.ox.ac.uk> |
---|---|
date | Thu, 05 Oct 2017 08:04:15 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/bytes.ml Thu Oct 05 08:04:15 2017 +0100 @@ -0,0 +1,20 @@ +(* bytes.ml -- simulate Bytes module for OCaml versions <= 4.01 *) +(* Copyright (c) 2017 J. M. Spivey *) + +let create n = String.create n + +let of_string s = s + +let get s i = String.get s i + +let set s i v = String.set s i v + +let unsafe_set s i v = String.unsafe_set s i v + +let to_string s = s + +let sub_string s i j = String.sub s i j + +let length s = String.length s + +let fill s i n c = String.fill s i n c