vl-string-search


(vl-string-search pattern string [ fromPos ] )

This function returns the position of pattern sub-string in string.

Arguments

pattern  (string) the string to be searched
string  (string) the string to search pattern in
fromPos  (integer, optional) specifies the start index in string; if omitted, 0 is used (search from string start)

Return

(integer) position of the pattern string as found in string; NIL if not found

Example

(vl-string-search "test" "? test is a test ?")  2
(vl-string-search "test" "? test is a test ?" 3)  12

Remarks

first character position/index in string is at index 0



©  Bricsys NV. All rights reserved.