mercredi 30 mars 2016

if statements and textinput value

If I have a textfield, and I want to use an IF statement to check that text field, for example, I can do this

if (thistxt.text=="query")
{  
thisbool = "true";
}

Now let's say I want to use an IF statement to call upon that same textfield but I don't want to pull that entire phrase, (query) maybe just the beginning or end of it, how could I do something like that? Let's say I want to activate the IF statement if that textfield contains or ends with "ery" but is not necessary perfectly equal to "ery".

Aucun commentaire:

Enregistrer un commentaire