Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Prodentim Probiotics Specially Designed For The Health Of Your Teeth And Gums

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

31,042 questions

40,761 answers

573 users

How to get the all indexes of specific letter in a string with VB.NET

1 Answer

0 votes
Module Module1

    Sub Main()

        Dim s As String = "VB.NET, P PH PHP, Java Python"

        Dim i As Integer = s.IndexOf("P")

        Do While (i <> -1)
            Console.WriteLine(i)
            i = s.IndexOf("P", i + 1)
        Loop

    End Sub

End Module


' run:
' 
' 8
' 10
' 13
' 15
' 23

 





answered Oct 2, 2018 by avibootz
...