明辉站/网站教程/内容

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

网站教程2024-02-08 阅读
[摘要]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


……

相关阅读