VB 中想根据字符串首尾两个字符来判断是否为我想要的数据,今天突然tight不能用了
我用两个文本框,显示提取的第一个和最后一个字符,结果第一个提取出来了,最后一个提取不出来
程序如下
Private Sub Winsockserver_DataArrival(ByVal bytesTotal As Long) '接收到数据的函数
Dim tmpstr As String
Winsockserver.GetData tmpstr
Text3.Text = Left(tmpstr, 1)
Text2.Text = Right(tmpstr, 1)
textget.Text = tmpstr
If Left(tmpstr, 1) = "@" And Right(tmpstr, 1) = "#" Then
Text1.Text = Mid(tmpstr, 2, 5)
End If
End Sub