[Previous]
[Contents]
[Next]

strupr(), _strupr(), _fstrupr()

convert a string to uppercase

Synopsis:

#include <string.h>

char *strupr( char *s );
char *_strupr( char *s );
char __far *_fstrupr( char __far *s );

Description:

The strupr() function replaces the string s 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/ISO 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 s.

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/ISO naming conventions.

Safety:
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

strlwr()


[Previous]
[Contents]
[Next]