vb.net - InStr array is in string -
currently i'm using instr find string in string, i'm new vb.net , wondering if can use instr search every element of array in string, or similar function this:
instr(string, array)
thanks.
you need loop:
dim bfound boolean = false each elem string in array if mystring.contains(elem) bfound = true exit end if next
you can transform function call more once easily:
public function myinstr(mystring string, array() string) boolean each elem string in array if mystring.contains(elem) return true next return false end function
then:
myinstr("my string text", new string() {"my", "blah", "bleh"})