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 DeclarationsDeclare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)