String.LastIndexOfAny Method (Char[])
Imports System
Class Sample
Public Shared Sub Main()
Dim str As String = "this is a test."
Dim start As Integer
Dim at As Integer
Dim target As String = "is"
Dim anyOf As Char() = target.ToCharArray()
start = str.Length - 1
at = str.LastIndexOfAny(anyOf)
If at > - 1 Then
Console.Write(at)
Else
Console.Write("(not found)")
End If
Console.Write("{0}{0}{0}", Environment.NewLine)
End Sub 'Main
End Class 'Sample
Related examples in the same category