c-project/C Project/C Project/main.c
int compare_token(const char *token1, const char *token2) {

	int i = 0;
	while (token1[i] != '\0' && token2[i] != '\0') {
		if (toupper(token1[i]) < toupper(token2[i]))
			return -1;
		else if (toupper(token1[i]) > toupper(token2[i]))
			return 1;
		i++;
	}

	if (token1[i] == '\0' && token2[i] == '\0')
		return 0;
	else if (token1[i] == '\0')
		return -1;
	else
		return 1;

}
/*
 * Utility function for comparing string case-insensitively.
 *
 * Input:
 *   token1 - the first token
 *   token2 - the second token
 *
 * Returns:
 *   as strcmp()
 */
Utility function for comparing string case-insensitively.

the first token
token2 - the second token

as strcmp()
Utility function for comparing string case - insensitively . the first token token2 - the second token as strcmp ()
int compare_token(const char *token1, const char *token2) {
	int i = 0;
	while (token1[i] != '\0' && token2[i] != '\0') {
		if (toupper(token1[i]) < toupper(token2[i]))
			return -1;
		else if (toupper(token1[i]) > toupper(token2[i]))
			return 1;
		i++;
	}
	if (token1[i] == '\0' && token2[i] == '\0')
		return 0;
	else if (token1[i] == '\0')
		return -1;
	else
		return 1;
}
int compare_token ( const char * token1 , const char * token2 ) { int i = 0 ; while ( token1 [ i ] != ' \0 ' && token2 [ i ] != ' \0 ' ) { if ( toupper ( token1 [ i ] ) < toupper ( token2 [ i ] ) ) return -1 ; else if ( toupper ( token1 [ i ] ) > toupper ( token2 [ i ] ) ) return 1 ; i ++ ; } if ( token1 [ i ] == ' \0 ' && token2 [ i ] == ' \0 ' ) return 0 ; else if ( token1 [ i ] == ' \0 ' ) return -1 ; else return 1 ; }
Utility function for comparing string case-insensitively.
Utility function for comparing string case - insensitively .