VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Easy Text Parse, for use with Winsock! Parses a string so you can send many values in 1string and t

by Deano Splamoni (15 Submissions)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 27th October 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Easy Text Parse, for use with Winsock! Parses a string so you can send many values in 1string and the parse them again.

API Declarations


Dim partB
Dim bitA,bitB,bitC

Rate Easy Text Parse, for use with Winsock! Parses a string so you can send many values in 1string and t



bitB = "email"
bitC = "website"
partA = bitA & "|" & bitB & "|" & bitC

winsock.senddata partA

'--- all winsock send and receive ---'

winsock.getdata partB

'go thru the string checking every char for a |
for i = 1 to len(partB)
  'if the char is |
  if mid(partB,i,1) = "|" then
  'put all the data before the | into bitA
  bitA = len(partB,1,i-1)
  'remove partA
  partB = len(partB,i+1)
  goto next:
  end if
next i

next:

for i = 1 to len(partB)
  if mid(partB,i,1) = "|" then

  bitB = len(partB,1,i-1)
  bitC = len(partB,i+1)
  goto done:
  end if
next i

done:
msgbox "bitA: " & bitA & " - bitB: " & bitB & " - bitC: " & bitC

Download this snippet    Add to My Saved Code

Easy Text Parse, for use with Winsock! Parses a string so you can send many values in 1string and t Comments

No comments have been posted about Easy Text Parse, for use with Winsock! Parses a string so you can send many values in 1string and t. Why not be the first to post a comment about Easy Text Parse, for use with Winsock! Parses a string so you can send many values in 1string and t.

Post your comment

Subject:
Message:
0/1000 characters