mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 19:25:28 -05:00
bugfix in CCString.find
This commit is contained in:
parent
df39602b9e
commit
a3bc61ef94
1 changed files with 1 additions and 1 deletions
|
|
@ -94,7 +94,7 @@ let find ?(start=0) ~sub s =
|
||||||
let n = String.length sub in
|
let n = String.length sub in
|
||||||
let i = ref start in
|
let i = ref start in
|
||||||
try
|
try
|
||||||
while !i + n < String.length s do
|
while !i + n <= String.length s do
|
||||||
if _is_sub ~sub 0 s !i ~len:n then raise Exit;
|
if _is_sub ~sub 0 s !i ~len:n then raise Exit;
|
||||||
incr i
|
incr i
|
||||||
done;
|
done;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue