You can use the index() function:
if (index(y, 'a') >= 0)
...
endif
which you can read about at
:help index()
-tim
Thank you! I read the manual section as closely as I could and came up
with nothing.
Thanks!
Glad I could help -- the Vim manual is epic in its scope and
thoroughness, so it's easy to miss what you're looking for if you
don't already have an idea what it's called (even for us more
seasoned vimmers, there are some dark corners of the docs that I
have to :helpgrep to find, wading through a small mountain of hits).
But be cheered -- the mailing list is a generally friendly place
(especially if you don't top-post ;-) with lots of helpful folk.
-tim