Mondeo
Centurion
Hi
I need a function to check if a string contains any 1 of 800 different values, if it does I need to return the matched value.
I just wondered what collection I should use for best performance, i'm assuming I should use code similar to the following
Function Check(byval strInp as string) as string
For each s as string in mycollection
if strinp.contains(s) Then
return s
End If
Next
End Function
Is this the best way?
Thanks
I need a function to check if a string contains any 1 of 800 different values, if it does I need to return the matched value.
I just wondered what collection I should use for best performance, i'm assuming I should use code similar to the following
Function Check(byval strInp as string) as string
For each s as string in mycollection
if strinp.contains(s) Then
return s
End If
Next
End Function
Is this the best way?
Thanks