#include <stdbool.h>
#include <string.h>
#include <ctype.h>
void noMoreNewline(char* theString){
char * isANewline;
isANewline = strrchr(theString, '\n');
// 개형문자
if(isANewline){
*isANewline = '\0';
}
}
void makeLowercase(char* theString){
int i = 0;
while(theString[i]){
// 소문자 변경
theString[i] = tolower(theString[i]);
// 대문자 변경
// theString[i] = toupper(theString[i]);
i++;
}
}
void getCharInfo(){
char theChar;
while((theChar = getchar()) != '\n'){
printf("Letter of Number %d\n\n", isalnum(theChar));
printf("Alphabetic Char %d\n\n", isalpha(theChar));
printf("Standard Blank %d\n\n", isblank(theChar));
printf("Ctrl Char %d\n\n", iscntrl(theChar));
printf("Number Char %d\n\n", isdigit(theChar));
printf("Anything But space %d\n\n", isgraph(theChar));
printf("Lowercase %d\n\n", islower(theChar));
printf("Uppercase %d\n\n", isupper(theChar));
printf("Punctuation %d\n\n", ispunct(theChar));
printf("Any Space %d\n\n", isspace(theChar));
}
}
int main(void){
getCharInfo();
}
댓글 없음:
댓글 쓰기