Sunday, July 7, 2019

How to find out if a string contains a specific string in it?

Hey,

what should I use in a conditional statement in order to execute a command only on observations whose string variable (their name) contains a specific phrase?
For example, I'm looking for something like:
Code:
replace var = x if name _____________
where the "______________" part should check if a specific sequence of letters I'll define is part of name.

Thanks in advance,
Ben

No comments:

Post a Comment