aboutsummaryrefslogtreecommitdiff
path: root/lib/cString.ml
diff options
context:
space:
mode:
authorPierre Letouzey2014-01-24 17:11:45 +0100
committerPierre Letouzey2014-01-30 18:36:49 +0100
commit5db2b3e3b637d23befa6f97d78d8f411f436f4a5 (patch)
tree4f4dd1f8b88c4dba4d625229899a489116f172b3 /lib/cString.ml
parent846ab8d4da6d2faf2c49dbdb5a6747b807471e7d (diff)
CString: avoid redefining is_sub
Diffstat (limited to 'lib/cString.ml')
-rw-r--r--lib/cString.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/cString.ml b/lib/cString.ml
index b6f53f05d8..9be81bd3d8 100644
--- a/lib/cString.ml
+++ b/lib/cString.ml
@@ -125,17 +125,17 @@ let drop_simple_quotes s =
(* gdzie = where, co = what *)
(* gdzie=gdzie(string) gl=gdzie(length) gi=gdzie(index) *)
-let rec is_sub gdzie gl gi co cl ci =
+let rec raw_is_sub gdzie gl gi co cl ci =
(ci>=cl) ||
((String.unsafe_get gdzie gi = String.unsafe_get co ci) &&
- (is_sub gdzie gl (gi+1) co cl (ci+1)))
+ (raw_is_sub gdzie gl (gi+1) co cl (ci+1)))
let rec raw_str_index i gdzie l c co cl =
(* First adapt to ocaml 3.11 new semantics of index_from *)
if (i+cl > l) then raise Not_found;
(* Then proceed as in ocaml < 3.11 *)
let i' = String.index_from gdzie i c in
- if (i'+cl <= l) && (is_sub gdzie l i' co cl 0) then i' else
+ if (i'+cl <= l) && (raw_is_sub gdzie l i' co cl 0) then i' else
raw_str_index (i'+1) gdzie l c co cl
let string_index_from gdzie i co =