Export (0) Print
Expand All
1 out of 3 rated this helpful - Rate this topic

CharUpper function

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


LPTSTR WINAPI CharUpper(
  _Inout_  LPTSTR lpsz
);

Parameters

lpsz [in, out]

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 Azeri. 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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

Unicode and ANSI names

CharUpperW (Unicode) and CharUpperA (ANSI)

See also

Reference
CharLower
CharLowerBuff
CharUpperBuff
Conceptual
Strings

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.