Definition:
<Extension()>
Function ExistsIn(value As String, ParamArray FieldValues() As String) As Boolean
For Each FieldValue As String In FieldValues
If FieldValue.ToLower.Contains(value.ToLower) Then Return True
Next
Return False
End Function
Usage:
Dim Value As String = "Love"
Debug.Print("{0}",value.ExistsIn("VBLover","vblover","vbloverprogrammer"))
Returns: True
Top comments (0)