Skip to content

Instantly share code, notes, and snippets.

@zhoukuo
Created July 13, 2012 03:52
Show Gist options
  • Save zhoukuo/3102623 to your computer and use it in GitHub Desktop.
Save zhoukuo/3102623 to your computer and use it in GitHub Desktop.
convert string to uppercase
/* use toupper() to convert string */
#include <ctype.h>
char* strupr(char *s)
{
char *d = s;
while(*d)
*d++ = toupper(*d);
return s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment