|
-
Jun 8th, 2002, 04:20 PM
#1
Split a string
Ello peoples,
Still working on a small IRC Example, and got a little stuck.
When i receive a string, i need to split it and send only 1 word back to an channel... But how do i have to split this String:
[email protected] JOIN :#testchannel
The only thing i need it the nickname before the !
VB Code:
Private Sub Winsock2_DataArrival(ByVal bytesTotal As Long)
On Error Resume Next
Dim Data As String
Dim Params As String
If InStr(1, Data, "JOIN") Then
Params = Replace(Split(UCase(Data)(0), "!"), vbCrLf, "")
Winsock2.SendData "PRIVMSG " & "#testchannel" & " :Hello " & Params & vbCrLf
Exit Sub
End If
-
Jun 8th, 2002, 04:28 PM
#2
The picture isn't missing
dim a() as string
a = split(data,"!")
msgbox a(0)
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jun 8th, 2002, 05:07 PM
#3
Works fantastic 
Thanks pall
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|