/usr/lib/s9fes/help/string-locate is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | S9 LIB (string-locate string1 string2) ==> offset | #f
(string-ci-locate string1 string2) ==> offset | #f
(load-from-library "string-locate.scm")
Attempt to locate the pattern STRING1 in the text STRING2. Return
the offset of the first occurrence of STRING1 in STRING2 or #F,
if STRING2 does not contain STRING1.
This program is based on "A Very Fast Substring Search Algorithm",
Daniel M. Sunday, CACM v33, #8, August 1990 and the
SUBSTRING-SEARCH-MAKER procedure by Ken Dickey (1990).
(string-locate "test" "This is a test string") ==> 10
(string-locate "TEST" "This is a test string") ==> #f
|