checking the validity of hex?
-
given a string containing hex,is there any function that checks if teh given string holds a valid hex value? cheerz!
-
given a string containing hex,is there any function that checks if teh given string holds a valid hex value? cheerz!
Not directly. It's fairly easy to write one though. Just check that there is nothing other than 0-9 or A-F in the string.
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
given a string containing hex,is there any function that checks if teh given string holds a valid hex value? cheerz!
-
Not directly. It's fairly easy to write one though. Just check that there is nothing other than 0-9 or A-F in the string.
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
And a-f People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
-
And a-f People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
Blake Miller wrote:
And a-f
I assumed he had at least some level of intelligence...
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
Blake Miller wrote:
And a-f
I assumed he had at least some level of intelligence...
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
Given the nature of the original question, I chose not to make any assumptions. We actually had production code similar to the following (greatly paraphrased)...
// check for ascii characters... if( cChar > 'a' && cChar < 'z' ){ ... blah blah blah... }
I suppose you can already see what is wrong with that, even if they were only looking for lower case characters... People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks