Chapter Contents

Previous

Next
strupr

strupr



Convert a String from Lowercase to Uppercase

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
CAUTION
EXAMPLE
RELATED FUNCTIONS
SEE ALSO


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%s\n",input);
}


RELATED FUNCTIONS

memupr , strlwr , strxlt


SEE ALSO


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.