|
-
May 1st, 2007, 04:35 PM
#1
Thread Starter
Addicted Member
[vb6] trimming from beginning..
ok, so im recieving a packet, and all I want to do is trim the first 4 bytes off of the beginning, and have the remainder, anybody know how to do this?
btw, $right(string, len(string)-4) doesn't work, it just gives me a byref mismatch error because its hex, I guess.
-
May 1st, 2007, 04:42 PM
#2
Re: [vb6] trimming from beginning..
The Right function shouldn't give that error, and it doesn't matter what the string contains.
vb Code:
str = Right$(str, Len(str) - 4)
'you can also use the Mid$ function:
str = Mid$(str, 5)
-
May 1st, 2007, 05:06 PM
#3
Thread Starter
Addicted Member
Re: [vb6] trimming from beginning..
ok, the mid worked perfect (except to take off 4 characters i needed to enter 7, lol), thanks alot.
-
May 1st, 2007, 05:08 PM
#4
Re: [vb6] trimming from beginning..
If you enter 7 it will remove 6 characters and not 4... But I'm glad you've got it working.
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
|