How to remove the first word from a string in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
		Dim s As String = "c++ c c# vb.net java python"

        If s.Length > 0 Then
            Dim i As Integer = s.IndexOf(" ") + 1
            s = s.Substring(i)
        End If

        Console.Write(s)
    End Sub
End Class



' run:
'
' c c# vb.net java python
'

 



answered Jun 20, 2022 by avibootz

Related questions

...