FindChar method


Prototype

FindChar Proto lpszString:LPSTR, chChar:CHAR

Syntax

Invoke FindChar, lpszString, chChar

Function

Searches the specified character inside the specified string.

Parameters

lpszString

Pointer to the effective address of the null-terminated string where to search.

chChar

A CHAR value containing the character to be searched for.

Return value

Eax returns the zero-based position of the character inside the string, or -1 if the character was not found.


REMARKS: The FindChar method expects lpszString to be a Unicode string if the application is running as Unicode, or an ANSI string if not (see the IsAppUnicode method). You can call FindCharA to find characters inside ANSI strings in Unicode applications, or FindCharW to find characters inside Unicode strings in ANSI applications.