std-position | ![]() |
std-position returns the first found position (index) of x in lst. It returns either an integer number or nil if not found. If x is the car of lst, then 0 is returned.
Possible Extension
std-position might support strings too. Lisp versions of position accept strings too but the known Vital Lisp /Visual Lisp extension not. We better use std-strpos for strings for now.
(std-position 2 '(0 1 2 3)) => 2 (std-position 'a '(0 1 2 3)) => nil
x: any lisp expression.
lst: any proper list.
An integer number or nil.
None.
(std-require 'STDLIST)
Defined in STDLIST
#+ VLISP == vl-position
#+ VILL == vlx-position