
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>strupr() convert string to uppercase</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
strupr() Convert String to Uppercase
#include <string.h> Required for declarations only
char *strupr(string);
char *string; String to be capitalized
strupr() converts letters in 'string' from lowercase to uppercase.
Returns: A pointer to the converted string; no error return.
Portability: Applies to MS DOS only.
-------------------------------- Example ---------------------------------
The following statements convert all lowercase letters to uppercase
before printing the string.
#include <string.h>
#include <stdio.h>
char *string = "convert this string to uppercase";
char *strptr;
main()
{
strptr = strupr(string);
printf("%s",strptr);
}
See Also: strlwr()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson