/usr/lib/s9fes/help/string-position 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 16 17 18 19 20 21 22 23 24 25 26 | S9 LIB (string-position string1 string2) ==> integer | #f
(string-ci-position string1 string2) ==> integer | #f
(string-word-position string1 string2) ==> integer | #f
(string-ci-word-position string1 string2) ==> integer | #f
(load-from-library "string-position.scm")
Find the first occurrence of a small string STRING1 in a large
string STRING2. Return the position of the first occurrence of
STRING1 in STRING2 (positions start at 0). When STRING2 does not
contain STRING1, return #F. STRING-CI-POSITION performs the same
function, but ignores case.
STRING-WORD-POSITION (STRING-CI-WORD-POSITION) differs from
STRING-POSITION (STRING-CI-POSITION) in that is matches only full
words, where a full word is a subsequence of characters that is
delimited on both sides by one of the following:
- the beginning of the string;
- the end of the string;
- a non-alphabetic character.
(string-position "ein" "gemeinsam") ==> 3
(string-position "people" "democracy") ==> #f
(string-word-position "me" "test me") ==> 5
(string-word-position "me" "testme") ==> #f
|