BanMe
January 13th, 2011, 22:44
What is the best way to call the functions listed below to determine what data is what, string or digit(0-9) or possibly hex(digit+a-f).Would you choose to recognize strings firsts or hex.
using only these functions.
for example..
you have a table with x elements assume you know nothing of what the table holds in it.
In what order do you think calling these functions above would cover the most 'data' correctly?
using only these functions.
Code:
int isalnum(int c) -- True if c is alphanumeric.
int isalpha(int c) -- True if c is a letter.
int isascii(int c) -- True if c is ASCII .
int iscntrl(int c) -- True if c is a control character.
int isdigit(int c) -- True if c is a decimal digit
int isgraph(int c) -- True if c is a graphical character.
int islower(int c) -- True if c is a lowercase letter
int isprint(int c) -- True if c is a printable character
int ispunct (int c) -- True if c is a punctuation character.
int isspace(int c) -- True if c is a space character.
int isupper(int c) -- True if c is an uppercase letter.
int isxdigit(int c) -- True if c is a hexadecimal digit.
for example..
you have a table with x elements assume you know nothing of what the table holds in it.
In what order do you think calling these functions above would cover the most 'data' correctly?