module KMP: sig
.. end
Substring search functions using the Knuth-Morris-Pratt algorithm.
val search : string -> string -> int -> int -> int
search pat
define a search function
f
such that
f s i0
i1
search the string
pat
in
s.[i0 .. i1-1]
and return the
position of the first match.
RaisesNot_found
if pat
is not found.
Invalid_argument
if i0 < 0
or i1 > String.length s
.
val search_case_fold : string -> string -> int -> int -> int
search_case_fold
is the same as search
except that the
search is case insensitive.