Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CharPrevExA function

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

Syntax


LPSTR WINAPI CharPrevExA(
  _In_ WORD   CodePage,
  _In_ LPCSTR lpStart,
  _In_ LPCSTR lpCurrentChar,
  _In_ DWORD  dwFlags
);

Parameters

CodePage [in]

Type: WORD

The identifier of the code page to use to check lead-byte ranges. Can be one of the code-page values provided in Code Page Identifiers, or one of the following predefined values.

ValueMeaning
CP_ACP
0

Use system default ANSI code page.

CP_MACCP
2

Use the system default Macintosh code page.

CP_OEMCP
1

Use system default OEM code page.

 

lpStart [in]

Type: LPCSTR

The beginning of the string.

lpCurrentChar [in]

Type: LPCSTR

A character in a null-terminated string.

dwFlags [in]

Type: DWORD

This parameter is reserved and must be zero.

Return value

Type: LPSTR

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

Remarks

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

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

CharPrevExA (ANSI)

See also

Reference
CharNextExA
CharPrev
Conceptual
Strings

 

 

Show:
© 2017 Microsoft