This documentation is archived and is not being maintained.

_strupr, _wcsupr, _mbsupr

Convert a string to uppercase.

char *_strupr(
   char *string 
wchar_t *_wcsupr(
   wchar_t *string 
unsigned char *_mbsupr(
   unsigned char *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.


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


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.


All versions of the C run-time libraries.


See the example for _strlwr.

See Also

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