Skip to content

Instantly share code, notes, and snippets.

@sooop
Last active December 12, 2015 12:09
Show Gist options
  • Save sooop/4770012 to your computer and use it in GitHub Desktop.
Save sooop/4770012 to your computer and use it in GitHub Desktop.
strupr 함수는 윈도용 c 컴파일러에만 포함되어 있음. mac 용으로 대체 함수 추가.
/* strupr : make uppercase string. exist in win32 c includes but not in mac's one */
#include <ctype.h> // for toupper()
void strupr(char *origin) { while(*origin != '\0') *origin = toupper(*origin++); }
@sooop
Copy link
Author

sooop commented Mar 15, 2013

이렇게 한 줄로 쓸 수도 있다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment