I know there’s a method contain(), it looks like this:
Dim arr() as string = {"apple","banana","orange"}
For each fruit in arr
If fruit.contains("app") Then
Return True
End If
Next
It will return true because “apple” contains letter “a”. This is not what I want. I want it to return true only when “apple” contains the whole word “app”. Is there any method or function to do this?
“apple” does in fact contain the whole word “app”, so Contains() is still probably your best bet.
From MSDN:
Here is the link to it with samples.
http://msdn.microsoft.com/en-us/library/dy85x1sa.aspx