Name
strupr - Converts all characters in a string to uppercase.
Syntax
#include <string.h>
char *strupr(string)
char *string;
Description
The strupr function converts any lower case letters in
string to upper case. Other characters are not affected.
Notes
The strupr function is not part of the ANSI definition, but
is instead a Microsoft extension to it, and should not be
used where ANSI portability is desired.
Return Value
The strupr function returns a pointer to the converted
string.
See Also
strlwr(DOS)
Example
#include <string.h> #include <stdio.h>
char string[100] = "This Was a Mixed-Case String", *copy;
main()
{
copy = strupr(strdup(string));
printf("The result string is: %s\n",copy);
} This program duplicates a string named string and uses
strupr to convert all lower case letters in the copy to
upper case.
(printed 6/18/89)