Previous: kmp partial, Up: kmp [Index]
Search the selected subsequence of text for the selected subsequence of pattern. Return the index of the first value in text that matched the first value in the pattern.
This function is like %string-contains and
%string-contains-ci, in facts those are implemented as:
(define (%string-contains text text-beg text-past
pattern pattern-beg pattern-past)
(%kmp-search char=? string-ref
text text-beg text-past
pattern pattern-beg pattern-past))
(define (%string-contains-ci text text-beg text-past
pattern pattern-beg pattern-past)
(%kmp-search char-ci=? string-ref
text text-beg text-past
pattern pattern-beg pattern-past))