 |
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: Mon Aug 26, 2002 8:12 pm
substring of a variable |
Ok, I have a variable named status which contains something like:
(sleep)(w)(th)(hu)
Is there an easy way to test to see if it contains a certain string? (like sleep)
I thought there was a function for this, but now I can't find it in the help file.
Thanx,
AzCowboy |
|
|
 |
Tarn GURU
Joined: 10 Oct 2000 Posts: 873 Location: USA
|
Posted: Mon Aug 26, 2002 8:42 pm |
quote:
Is there an easy way to test to see if it contains a certain string? (like sleep)
Pos() is what you're looking for. Excerpt from the help file attached.
-Tarn
pos
Syntax: %pos(p,s)
return the position of pattern p in string s. Return 0/false if not found
Examples:
#SHOW %pos(ABC,12AB56ABC10ABC)
displays: 7 |
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|