vl-string-position


(vl-string-position number string [ from [ reverse ] ] )

This function searches for the first occurrence of number character in string, starting at from position.

Arguments

number  (integer) the integer value of the character to search for in string
string  (string) the string to be scanned for number character
from  (integer, optional) specifies the start index in string; if omitted, 0 is used (entire string)
reverse  (T/NIL, optional) if specified and T, the string is scanned from the end to the from index

Return

(integer) returns the absolute index (from 0) where number is first found in string; NIL

Example

(vl-string-position 32 "abc def ghi")  3
(vl-string-position 32 "abc def ghi" 4)  7
(vl-string-position 32 "abc def ghi" 0 T)  7
(vl-string-position 9 "abc def ghi" 0 T)  NIL

Remarks

first character position/index in string is at index 0



©  Bricsys NV. All rights reserved.