textbox
我有一个循环,它逐行提取字符串,每次迭代都有多个条件。如果条件为真,我想从中删除该行textbox
有没有办法从字符串中删除整行?这是我的代码..
Dim fileContents As String
fileContents = txtOCR.Text
Dim strSet(1000) As String
Dim a As Integer = 1
Dim words As String
MsgBox(fileContents)
For i = 1 To fileContents.Length
Dim xx As String = Mid(fileContents, i, 1)
'parse text line by line
If xx = Chr(10) Then
If Mid(fileContents, i - 1, 1) = Chr(13) Then
strSet(i) = Mid(fileContents, a, (i - a) - 1)
'count words
Dim intCount As Integer
intCount = 1
For b = 1 To Len(strSet(i))
If Mid(strSet(i), b, 1) = " " Then
intCount = intCount + 1
End If
Next
If txtTitle.Text = "" And intCount = 1 Then
txtTitle.Text = " " & strSet(i)
ElseIf intCount = 1 Then
If strSet(i).Contains("BY") = True Then
GoTo lastline
ElseIf strSet(i).Contains("by") = True Then
GoTo lastline
ElseIf strSet(i).Contains("By") = True Then
GoTo lastline
Else
txtTitle.Text = txtTitle.Text + " " & strSet(i)
End If
End If
a = i
End If
Next
当找到关键字“BY”时,是否可以复制下一行字符串?我需要帮助这是我的论文项目..