Simplified Common Lisp reference
search
Symbol class: Sequences (Lists, Strings) and Arrays
Syntax:
Symbol type: function
searchsequence1sequence2test(keyword)from-end(keyword)start1(keyword)start2(keyword)end1(keyword)end2(keyword)key(keyword) => position
Argument description:
sequence1 a sequence to be found in sequence2
sequence2 a sequence to be searched
test function key and item comparison
from-end direction of search, default is NIL - forward
start1 starting position in sequence1, default is 0
start2 starting position in sequence2, default is 0
end1 final position in sequence1, default is NIL - end of sequence
end2 final position in sequence2, default is NIL - end of sequence
key function for extracting value before test

SEARCH function searches for one sequence in another. See also POSITION, POSITION-IF, FIND, FIND-IF and MEMBER.

(search "lo" "hello world") => 3
(search "lo" "HelLo WoRLd" :key #'char-upcase) => 3
(search "lo" "HelLo WoRLd") => NIL
Function indexFull documentation for search (HyperSpec)