view lib/bytes.ml @ 0:5dd13b8deb54 tip basis

Basis
author Mike Spivey <mike@cs.ox.ac.uk>
date Thu, 16 Aug 2018 13:59:09 +0100
parents
children
line wrap: on
line source
(* 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