Im trying to do an if statement with an condition that if the string contains a certain word like bellow
if(phrase) = "word")
Any ideas?
Asked
Active
Viewed 571 times
7

KayKoder
- 75
- 4
-
BTW: im using an extension called re (regular expressions) – KayKoder May 10 '15 at 19:34
1 Answers
6
NetLogo's member?
primitive will do exactly that:
if member? "word" phrase [ do-something ]

Nicolas Payette
- 14,847
- 1
- 27
- 37
-
-
A frequent use of the primitive is to check if an agent is contained in an agent set. Talking about a "member" of a set is commonplace in math. – Nicolas Payette May 11 '15 at 12:34