明辉手游网中心:是一个免费提供流行视频软件教程、在线学习分享的学习平台!

字符串根据多个字符进行分割的一种方法

[摘要]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