StrRChrW function (shlwapi.h)
Searches a string for the last occurrence of a specified character. The comparison is case-sensitive.
Syntax
PCWSTR StrRChrW(
[in] PCWSTR pszStart,
[in, optional] PCWSTR pszEnd,
WCHAR wMatch
);
Parameters
[in] pszStart
Type: PTSTR
A pointer to the null-terminated string to be searched.
[in, optional] pszEnd
Type: PCTSTR
A pointer into the source string that defines the range of the search. Set pszEnd to point to a character in the string and the search will stop with the preceding character. Set pszEnd to NULL to search the entire string.
wMatch
Type: TCHAR
The character to search for.
Return value
Type: PTSTR
Returns a pointer to the last occurrence of the character in the string, if successful, or NULL if not.
Remarks
The comparison assumes that pszEnd points to the end of the string.
Note
The shlwapi.h header defines StrRChr as an alias that 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 is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | shlwapi.h |
Library | Shlwapi.lib |
DLL | Shlwapi.dll (version 4.71 or later) |