strupr
Replaces each character of a string with its uppercase equivalent
#include <string.h>
char *strupr (
char *s1);
The address of the original string s1 is returned.
strupr replaces the string s1 with uppercase characters by invoking the toupper function for each character in the string.
#include <string.h> char source[ ] = { "A mixed-case STRING" }; main () { printf ("%s\n", source); printf ("%s\n", strupr ( source) ); printf ("%s\n", source); }
produces the following:
A mixed-case STRING A MIXED-CASE STRING A MIXED-CASE STRING