comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:bfdcc3820b32
1 (* bytes.ml -- simulate Bytes module for OCaml versions <= 4.01 *)
2 (* Copyright (c) 2017 J. M. Spivey *)
3
4 let create n = String.create n
5
6 let of_string s = s
7
8 let get s i = String.get s i
9
10 let set s i v = String.set s i v
11
12 let unsafe_set s i v = String.unsafe_set s i v
13
14 let to_string s = s
15
16 let sub_string s i j = String.sub s i j
17
18 let length s = String.length s
19
20 let fill s i n c = String.fill s i n c