This commit is contained in:
Ognjen Milan Robovic 2023-10-03 10:35:13 -04:00
parent d43f588075
commit 21000e79c0
2 changed files with 5 additions and 5 deletions

View File

@ -465,7 +465,7 @@ int character_is_alpha (char character) {
int character_is_symbol (char character) {
char * symbols = "~!@#$%^&*()+{}|:\"<>?`-=[]\\;',./";
return (character_compare_array (character, symbols, string_length (symbols)));
return (character_compare_array (character, symbols));
}
int character_is_visible (char character) {
@ -487,17 +487,17 @@ int character_is_underscore (char character) {
int character_is_hexadecimal (char character) {
char * hexadecimals = "0123456789ABCDEF";
return (character_compare_array (character, hexadecimals, string_length (hexadecimals)));
return (character_compare_array (character, hexadecimals));
}
int character_compare_array (char character, char * character_array, int count) {
int character_compare_array (char character, char * character_array) {
int i = 0;
do {
if (character == character_array [i]) {
return (1);
}
} while (++i != count);
} while (++i != string_length (character_array));
return (0);
}

View File

@ -117,7 +117,7 @@ extern int character_is_escape (char);
extern int character_is_underscore (char);
extern int character_is_hexadecimal (char);
extern int character_compare_array (char, char *, int);
extern int character_compare_array (char, char *);
extern int string_length (char *);
extern void string_reverse (char *);