How to find the index of the last occurrence of one string within another in VB.NET

1 Answer

0 votes
Imports System
 
Public Class Test
    Public Shared Sub Main()
        Dim s As String = "java vb.net python c# c++ vb.net"
 
        Dim search As String = "vb"
 
        Dim index As Integer = InStrRev(s, search)
         
        Console.WriteLine(index)
    End Sub
End Class
 
 
 
 
' run:
'
' 27
'

 



answered Nov 19, 2021 by avibootz
...