[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 SpanIncluding method extracts characters of a string that are identified by lpszCharSet.
CHString throw(CHeap_Exception) SpanIncluding( LPCWSTR lpszCharSet );
A string interpreted as a set of characters.
The SpanIncluding method returns a substring that contains characters in the string that are in lpszCharSet.
If the first character in the string is not in the specified set, the method returns an empty substring.
The SpanIncluding method starts with the first character of the string and stops when a character is found in the string but not in lpszCharSet.
The following code example shows the use of CHString::SpanIncluding.
CHString str( L"cabbage" ); CHString res = str.SpanIncluding( L"abc" ); assert( res == L"cabba" ); res = str.SpanIncluding( L"xyz" ); assert( res.IsEmpty( ) );
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|
|Header||chstring.h (include FwCommon.h)|