How to get index before quotes in a string with VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
        Dim str As String = "c vb ""java"" python c++"
		
        Dim index_before_quotes As Integer = str.IndexOf("""") - 1
		
        Console.WriteLine(index_before_quotes)
    End Sub
End Class


	
	
	
' run:
'
' 4
'

 



answered Aug 19, 2023 by avibootz
...