in reply to while loop on binary : \x30
Many thanks for the prompt replies.
Yes, I can avoid a "while" loop by using "split", and that solves the problem as far as my script goes. Hopefully, I must say, because as someone said in these pages once, dealing with binary data can cause acute pains in the head.
I notice that it doesn't have to be a binary string: a simple text string ending in a zero, or consisting only of a zero will not make the character available in the while loop. This is for me in certain contexts a problem. For the future I must avoid using 'while' to munch a string.
|