mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -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 i = ref start in
|
||||
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;
|
||||
incr i
|
||||
done;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue