I have a string of bytes (data read from a binary file by LoadFile()) in which I have to replace a substring by another string. This other string, rpl, is shorter than the substring, and should be extended to the length of the substring by adding a number of null characters chr(0). E.g.:
Code: Select all
'Dim As String rpl
'rpl = ...
rpl = rpl + chr(0) + chr(0) + chr(0) + chr(0)
But this does not work, rpl is not extended by this way. What can I do?