hi,
I have some files containing the ascii value 00, (even if it isn't an ascii value). I want to write an VB app to replace this with character space.
Any suggestions,
Thans in advance
ThoRvalZ
Printable View
hi,
I have some files containing the ascii value 00, (even if it isn't an ascii value). I want to write an VB app to replace this with character space.
Any suggestions,
Thans in advance
ThoRvalZ
you got to open the file and read the whole content of the file into a string (try http://vblib.virtualave.net, there is a function in vbFileIO which able to do so).
Let say, you got the string already call s. then
do the following
for i = 1 to len(s)
if mid(s,i,1) = chr(0) then
mid(s,i,1) = chr(32)
end if
next i
after this, the string should no longer contain any 0 but space instead.
so, you need to write the string back to a file, again , there is another function which able to do so also
hope this help.
You can use REPLACE function too.
myString = replace(myString,chr(0),chr(32))
Excelent! (I am out of vote for today)
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.