Export (0) Print
Expand All
Expand Minimize

_strupr, _wcsupr, _mbsupr

Convert a string to uppercase.

char *_strupr(
   char *string 
);
wchar_t *_wcsupr(
   wchar_t *string 
);
unsigned char *_mbsupr(
   unsigned char *string 
);

Parameter

string
String to capitalize.

Return Value

Returns a pointer to the altered string. Because the modification is done in place, the pointer returned is the same as the pointer passed as the input argument. No return value is reserved to indicate an error.

Remarks

The _strupr function converts, in place, each lowercase letter in string to uppercase. The conversion is determined by the LC_CTYPE category setting of the current locale. Other characters are not affected. For more information on LC_CTYPE, see setlocale.

_wcsupr and _mbsupr are wide-character and multibyte-character versions of _strupr. The argument and return value of _wcsupr are wide-character strings; those of _mbsupr are multibyte-character strings. These three functions behave identically otherwise.

Generic-Text Routine Mappings

TCHAR.H routine _UNICODE & _MBCS not defined _MBCS defined _UNICODE defined
_tcsupr _strupr _mbsupr _wcsupr

Requirements

Routine Required header Compatibility
_strupr <string.h> Win 98, Win Me, Win NT, Win 2000, Win XP
_wcsupr <string.h> or <wchar.h> Win 98, Win Me, Win NT, Win 2000, Win XP
_mbsupr <mbstring.h> Win 98, Win Me, Win NT, Win 2000, Win XP

For additional compatibility information, see Compatibility in the Introduction.

Libraries

All versions of the C run-time libraries.

Example

See the example for _strlwr.

See Also

Locale Routines | String Manipulation Routines | _strlwr | Run-Time Routines and .NET Framework Equivalents

Show:
© 2014 Microsoft