明輝手游網(wǎng)中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

字符串根據(jù)多個字符進行分割的一種方法

[摘要]Dim s As String = "gtdfg123fdgdfs123dd123" Dim c() As Char = "1", "2", "3" Dim a() As String ...
 

Dim s As String = "gtdfg123fdgdfs123dd123"

        Dim c() As Char = {"1", "2", "3"}

        Dim a() As String = s.Split(c)

        Dim p As String

        For Each p In a

            If p <> "" Then

                MessageBox.Show(p)

            End If

   Next