I receive strings in their hex format, i.e. s = "0x0ff"
or s = "0fd"
how can I check whether the above type of strings are null terminated or not? thanks!
views:
226answers:
2fixed it, see above!
Adrian
2009-12-11 12:24:52
A:
Why would you care wether python strings are null terminated?
If you want to check wether the strings start by "0x" you can just use
x.startswith("0x")
as x cannot be located anywhere else in a hexstring.
Thomas Ahle
2009-12-11 12:21:40