VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ByteString String Functions For Byte Arrays

by Nite Software Solutions (1 Submission)
Category: VB function enhancement
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

Perform common string functions on byte arrays. Concatenation, InStr, InStrRev, Left, Mid, Right, and IsNumeric. Most functions have the option of returning either a string, or a byte array (there is a function for each). Takes advantage of the CopyMemory API function for speed. Now you can work with byte arrays almost as easily as you can with strings without a speed sacrifice. I put all the code in a module (as opposed to a class) because these are just functions, and I don't see any benefit of having it in a class module. If you have any comments/suggestions/bug reports, post them here so I can update the code. Also leave a comment if you find this useful. :)

API Declarations
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)

Rate ByteString String Functions For Byte Arrays

Download ByteString String Functions For Byte Arrays

Download ByteString String Functions For Byte Arrays (6 KB)

ByteString String Functions For Byte Arrays Comments

No comments have been posted about ByteString String Functions For Byte Arrays. Why not be the first to post a comment about ByteString String Functions For Byte Arrays.

Post your comment

Subject:
Message:
0/1000 characters