CharUpperA function (winuser.h)

Converts a character string or a single character to uppercase. If the operand is a character string, the function converts the characters in place.

Syntax

LPSTR CharUpperA(
  [in, out] LPSTR lpsz
);

Parameters

[in, out] lpsz

Type: LPTSTR

A null-terminated string, or a single character. If the high-order word of this parameter is zero, the low-order word must contain a single character to be converted.

Return value

Type: LPTSTR

If the operand is a character string, the function returns a pointer to the converted string. Because the string is converted in place, the return value is equal to lpsz.

If the operand is a single character, the return value is a 32-bit value whose high-order word is zero, and low-order word contains the converted character.

There is no indication of success or failure. Failure is rare. There is no extended error information for this function; do not call GetLastError.

Remarks

Note that CharUpper always maps lowercase I ("i") to uppercase I, even when the current language is Turkish or Azerbaijani. If you need a function that is linguistically sensitive in this respect, call LCMapString.

Conversion to Unicode in the ANSI version of the function is done with the system default locale in all cases.

Note

The winuser.h header defines CharUpper as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll

See also

CharLower

CharLowerBuff

CharUpperBuff

Conceptual

Reference

Strings