Skip to content

Instantly share code, notes, and snippets.

@Baha
Created October 4, 2011 17:45
Show Gist options
  • Save Baha/1262284 to your computer and use it in GitHub Desktop.
Save Baha/1262284 to your computer and use it in GitHub Desktop.
A gist for a toUpper function written in C
p1 = cadena1;
p2 = cadena2;
for (int i = 0; i < strlen(cadena1); i++)
{
if (*p1 > 'a' && *p1 < 'z')
*p2 = *p1 + ('A' - 'a');
else *p2 = *p1;
p1++;
p2++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment