mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
fix(string): compat 4.02
This commit is contained in:
parent
55e92b4629
commit
89fc7f9c77
1 changed files with 2 additions and 2 deletions
|
|
@ -696,7 +696,7 @@ let prefix ~pre s =
|
|||
else (
|
||||
let rec check i =
|
||||
if i=len then true
|
||||
else if not (Char.equal (String.unsafe_get s i) (String.unsafe_get pre i)) then false
|
||||
else if Pervasives.(<>) (String.unsafe_get s i) (String.unsafe_get pre i) then false
|
||||
else check (i+1)
|
||||
in
|
||||
check 0
|
||||
|
|
@ -719,7 +719,7 @@ let suffix ~suf s =
|
|||
let off = String.length s - len in
|
||||
let rec check i =
|
||||
if i=len then true
|
||||
else if not (Char.equal (String.unsafe_get s (off+i)) (String.unsafe_get suf i)) then false
|
||||
else if Pervasives.(<>) (String.unsafe_get s (off+i)) (String.unsafe_get suf i) then false
|
||||
else check (i+1)
|
||||
in
|
||||
check 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue