VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

ByteString String Functions For Byte Arrays

Nite Software Solutions  (1 Submission)   VB function enhancement   Beginner   Wed 3rd February 2021

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 (6(6 Vote))

Download ByteString String Functions For Byte Arrays

ByteString String Functions For Byte Arrays Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters