Is there a way to test hexstrings to see if its a valid hex value?
For example my packet always comes in as a hex string. it has "123CXXXXX" 3C being the length.
Problem is, if for some odd reason my Socket gets something other than a hex string, it crashes because well, 3C isnt a length, its whatever the text is. Such as any combination of letters and numbers.
Is there a way to test that the string has all valid hexadecimal letters/numbers?
For example my packet always comes in as a hex string. it has "123CXXXXX" 3C being the length.
Problem is, if for some odd reason my Socket gets something other than a hex string, it crashes because well, 3C isnt a length, its whatever the text is. Such as any combination of letters and numbers.
Is there a way to test that the string has all valid hexadecimal letters/numbers?