strupr -- Convert a String from Lowercase to Uppercase

SYNOPSIS

 #include <lcstring.h>

 char *strupr(char *str);
 

DESCRIPTION

strupr converts lowercase alphabetic characters ('a' through 'z') in the input string str into uppercase characters ('A' through 'Z').

strupr is not affected by the program's locale.

RETURN VALUE

strupr returns a pointer to the original input string.

CAUTION

The input string must be properly terminated with the null character; otherwise, a protection or addressing exception can occur.

EXAMPLE

  #include <lcstring.h>
  #include <stdio.h>

  #define MAXLEN 80

  main()
  {
     char line[MAXLEN];
     char *input;

     puts("Enter a string of lowercase characters:");
     input = gets(line);
     strupr(input);
     printf("Your converted input is as follows:n%sn",input);
  }

 

RELATED FUNCTIONS

memupr, strlwr, strxlt

SEE ALSO

String Utility Functions