Skip to content

Latest commit

 

History

History
124 lines (84 loc) · 3.77 KB

nf-winuser-charprevw.md

File metadata and controls

124 lines (84 loc) · 3.77 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winuser.CharPrevW
CharPrevW function (winuser.h)
Retrieves a pointer to the preceding character in a string. This function can handle strings consisting of either single- or multi-byte characters. (Unicode)
CharPrev
CharPrev function [Menus and Other Resources]
CharPrevW
_win32_CharPrev
_win32_charprev_cpp
menurc.charprev
winui._win32_charprev
winuser/CharPrev
winuser/CharPrevW
menurc\charprev.htm
menurc
VS|winui|~\winui\windowsuserinterface\resources\strings\stringreference\stringfunctions\charprev.htm
12/05/2018
CharPrev, CharPrev function [Menus and Other Resources], CharPrevA, CharPrevW, _win32_CharPrev, _win32_charprev_cpp, menurc.charprev, winui._win32_charprev, winuser/CharPrev, winuser/CharPrevA, winuser/CharPrevW
winuser.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
CharPrevW (Unicode) and CharPrevA (ANSI)
User32.lib
User32.dll
Windows
19H1
CharPrevW
winuser/CharPrevW
c++
APIRef
kbSyntax
DllExport
User32.dll
API-MS-Win-Core-String-l2-1-0.dll
KernelBase.dll
API-MS-Win-Core-String-l2-1-1.dll
API-MS-Win-Core-Stringansi-l1-1-0.dll
API-MS-Win-DownLevel-user32-l1-1-0.dll
API-MS-Win-DownLevel-user32-l1-1-1.dll
CharPrev
CharPrevA
CharPrevW

CharPrevW function

-description

Retrieves a pointer to the preceding character in a string. This function can handle strings consisting of either single- or multi-byte characters.

-parameters

-param lpszStart [in]

Type: LPCTSTR

The beginning of the string.

-param lpszCurrent [in]

Type: LPCTSTR

A character in a null-terminated string.

-returns

Type: LPTSTR

The return value is a pointer to the preceding character in the string, or to the first character in the string if the lpszCurrent parameter equals the lpszStart parameter.

-remarks

When called as an ANSI function, CharPrev uses the system default code-page, whereas CharPrevExA specifies a code-page to use.

This function works with default "user" expectations of characters when dealing with diacritics. For example: A string that contains U+0061 U+030a "LATIN SMALL LETTER A" + COMBINING RING ABOVE" — which looks like "å", will advance two code points, not one. A string that contains U+0061 U+0301 U+0302 U+0303 U+0304 — which looks like "a´^~¯", will advance five code points, not one, and so on.

Note

The winuser.h header defines CharPrev 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.

-see-also

CharNext

CharNextExA

CharPrevExA

Conceptual

Reference

Strings