You may think that this is what happens when somebody lurking with dark occult code lines.
Just pour it with holy water and avoid it next time.
But please try to not questioning the origin of the problem. Even alchimie, the bad science was a great source of experiences.
So strings can have ordinary binary data. This is good. But what if we have a twisted string like this:
Code: Select all
t={72,111,108,108,121,0,119,111,111,100,0}
s$=ArrayToStr(t)
DebugPrint(s$)
DebugPrint() and a bunch of another functions stop at the first zero.
However for example if it is concatenated into an xml file it ruins the whole thing. This is what happened for me.
So, how can I drop the part from the first zero?
Findstring() can't be used with Chr(0) for search string. - Wrong usage/parameters for this command!
Iterating all over the strings to be safe would be slow and ugly.
Is there a way to get just the string (to the first zero) from a binary 'string'?