|
Lasivian Wanderer
Joined: 25 Jan 2002 Posts: 76 Location: USA
|
Posted: Fri Oct 16, 2009 5:25 pm
How do I search a string list variable? |
I've searched heavily and all I see is ways to search a database for a string, but not a string variable for a specific string.
I'm guessing there has to be a way to do this.
Thanks |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Oct 16, 2009 5:37 pm |
There's %ismember(), which is designed to return the element position of the data you are searching for, and there's %pos(), which is helpful for basic strings.
Each one returns a different result. If you wanted to %ismember("Joe","John|Joe|Jack") then the result would be 2, because "Joe" is the second item in the list. However, if you wanted to %pos("Joe","John|Joe|Jack"), then the result would be 6, because that's the character position where the string "Joe" starts.
There are other functions that do other things, too. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4689 Location: Pensacola, FL, USA
|
Posted: Mon Oct 19, 2009 6:59 pm |
%match is my favorite... its essentially a trigger in a function
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|