Update is_valid_hex_char
This commit is contained in:
parent
ba813ea5bf
commit
9cba0172b9
@ -370,23 +370,7 @@ bool strequal(const char *const first, const char *const second) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool is_valid_hex_char(const char input) {
|
bool is_valid_hex_char(const char input) {
|
||||||
switch (input) {
|
return (input >= 'A' && input <= 'F') || (input >= 'a' && input <= 'e');
|
||||||
case 'A':
|
|
||||||
case 'B':
|
|
||||||
case 'C':
|
|
||||||
case 'D':
|
|
||||||
case 'E':
|
|
||||||
case 'F':
|
|
||||||
case 'a':
|
|
||||||
case 'b':
|
|
||||||
case 'c':
|
|
||||||
case 'd':
|
|
||||||
case 'e':
|
|
||||||
case 'f':
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ishex(const char input) {
|
bool ishex(const char input) {
|
||||||
|
Loading…
Reference in New Issue
Block a user