From a75770eb41e8a3bbfb44cb65d04bb3af29448fe7 Mon Sep 17 00:00:00 2001 From: Matej Kosik Date: Wed, 28 Sep 2016 16:19:23 +0200 Subject: CLEANUP: remove the definition of the "CString.map" function. We will use the official "String.map" function instead. --- lib/cString.ml | 7 ------- 1 file changed, 7 deletions(-) (limited to 'lib/cString.ml') diff --git a/lib/cString.ml b/lib/cString.ml index 0c2ed2e7c0..61ed03083e 100644 --- a/lib/cString.ml +++ b/lib/cString.ml @@ -17,7 +17,6 @@ sig val explode : string -> string list val implode : string list -> string val strip : string -> string - val map : (char -> char) -> string -> string val drop_simple_quotes : string -> string val string_index_from : string -> int -> string -> int val string_contains : where:string -> what:string -> bool @@ -78,12 +77,6 @@ let strip s = let a = lstrip_rec 0 and b = rstrip_rec (n-1) in String.sub s a (b-a+1) -let map f s = - let l = String.length s in - let r = String.create l in - for i = 0 to (l - 1) do r.[i] <- f (s.[i]) done; - r - let drop_simple_quotes s = let n = String.length s in if n > 2 && s.[0] = '\'' && s.[n-1] = '\'' then String.sub s 1 (n-2) else s -- cgit v1.2.3