help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build-in function for obtaining the index of an element of a list


From: ishi soichi
Subject: Re: build-in function for obtaining the index of an element of a list
Date: Thu, 5 Jan 2012 08:52:17 +0900

Thanks. This is what I wanted.

soichi

2012/1/4 Juanma Barranquero <lekktu@gmail.com>
> Is there any Emacs built-in function that returns the index of an element of
> a list?

If you don't mind using the CL package (included with Emacs), the
function you want is `position'

 (position "banana" '("apple" "banana" "orange") :test 'string=)   =>  1

    Juanma


reply via email to

[Prev in Thread] Current Thread [Next in Thread]