strupr, _strupr, _fstrupr

convert a string to uppercase

Synopsis:

#include <string.h>
char *strupr( char *s1 );
char *_strupr( char *s1 );
char __far *_fstrupr( char __far *s1 );

Description:

The strupr() and _fstrupr() functions replace the string s1 with uppercase characters, by invoking the toupper function for each character in the string.

The _strupr() function is identical to strupr(). Use _strupr() for ANSI naming conventions.

The _fstrupr() function is a data-model-independent form of the strupr() function. It accepts far pointer arguments, and returns a far pointer. It is most useful in mixed memory model applications.

Returns:

the address of the original string s1

See also:

strlwr()

Examples:

#include <stdio.h>
#include <string.h>

char source[] = { "A mixed-case STRING" };

void main()
  {
    printf( "%s\n", source );
    printf( "%s\n", strupr( source ) );
    printf( "%s\n", source );
  }

produces the output:

A mixed-case STRING
A MIXED-CASE STRING
A MIXED-CASE STRING

Classification:

WATCOM

_strupr() conforms to ANSI naming conventions.

Systems:

strupr()
All (except DOS/PM)
_strupr()
All (except DOS/PM)
_fstrupr()
All (except Netware, DOS/PM)