Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
acadadmin3KNUF
403 Views, 2 Replies

How to change to "include this" instead of "match this"?

Could someone inform me how how to modify this line of iLogic code:

 

Dim part_to_find As String = "scissors_for_under_21" 

I need for this line of code to read "must INCLUDE" this bit of text as opposed to "must MATCH" this.   Thanks for your attention.

I'm not entirely sure this is a valid question...it may already be doing it and my code problems lie elsewhere.

ckeveryga
in reply to: acadadmin3KNUF

Correct, your issue is somewhere else in the code. That line only creates the string, you need to compare the string elsewhere. 

Dim strString As String = "teststring"

If strString.Contains("test") Then
	'Do stuff if string contains "test"
End If 

If strString = "test" Then
	'Do stuff if string is "test"
End 

 In this code, the first statement is true, but not the second.