Documentation

ismember

Syntax: %ismember(s,list)

return 0 (false), if s is not a member of the given string list. Otherwise return the item number (position of s in the list)

NOTE: Testing a value in a string list using %ismember is significantly faster when a string list is sorted using #SORT

Examples:

#SHOW %ismember("abc","def|ghi jk|abc")

Displays 3

#VAR friendsList {Zugg|Darker|Penny}
#VAR petitioner zyxcef
#IF (%ismember(@petitioner,@friendsList)) {cast heal @petitioner} {say Nope.}


sends 'say Nope.' to the mud.

Add comment

Login or register to post comments