Windows Dev Center

Expand Minimize

CHString::ReverseFind method

[The CHString class is part of the WMI Provider Framework which is now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. The MI APIs should be used for all new development.]

The ReverseFind method searches a CHString string for the last match of a substring. This method is similar to the runtime function, wcsrchr.

Syntax


int ReverseFind(
   WCHAR ch
);

Parameters

ch

The character that the method searches for.

Return value

Returns the zero-based index of the last character in the CHString string that matches the requested character. If the character is not found, the method returns a value of -1.

Examples

The following code example shows the use of CHString::ReverseFind.


CHString s( L"abcabc" );
assert( s.ReverseFind( 'b' ) == 4 );

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Chstring.h (include FwCommon.h)

Library

Framedyn.lib

DLL

Framedyn.dll

See also

CHString
CHString::Find
CHString::FindOneOf

 

 

Show:
© 2015 Microsoft