string.split 应用
采用string.split将字符串依据分隔符,转换成字符串数组,生成的字符串数组中会包含空数组元素,需要通过StringSplitOptions.RemoveEmptyEntries参数选项去除。
Dim SQL As New StringBuilder
Dim splitter As Char() = {Chr(13), Chr(10)}
Dim source As String() = TxtPrivate.Text.Split(splitter, StringSplitOptions.RemoveEmptyEntries)
For Each line1 As String In source
SQL.AppendLine("SQL.Append(" & Chr(34) & " " & line1 & Chr(34) & ")")
Next
TxtProperty.Text = SQL.ToString