示例#1
0
bool handleInsertBetween(char c, char r, generic_stack* output) {

	char temp;
	char iter;

	if (r <= c) {
		printf("Cannot insert between %c and %c\n", c, r);
		return false;
	}

	if ((isUppercase(c) && isUppercase(r)) || (isLowercase(c) && isLowercase(r)) || (isNumeric(c) && isNumeric(r))) {
		for (iter = c; iter <= r; iter++) {
			stackPush(output, &iter);
			if (iter != r) {
				temp = '|';
				stackPush(output, &temp);
			}
		}
		return true;
	}
	
	return false;
}
示例#2
0
// Checks if a character is an English letter or not, regardless of case.
bool isLetter(char testChar)
{
	return (isUppercase(testChar) || isLowercase(testChar));
}
示例#3
0
bool isLetter(unsigned char c)
{
    return isLowercase(c) || isUppercase(c);
}