Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ISafeString::bstrspn ( P6BCSTR pbcsSearchIn,
const P6BCSTR pbcsSearchSet,
P6BCSTR pbcsFound 
)
pure virtual

Scans the specified P6BCSTR for the first occurrence of any character in specified set of characters.

The set of characters to match may include the NULL character (zero). If a match is found, the P6BCSTR pointed too by pbcsFound will be populated with a pointer to the character and appropriate length. pbcsSearchIn will be updated to point the character immediately following the matched character.

This method does not modify the strings pointed to by pbcsSearchIn or pbcsSearchSet and is reentrant.

Parameters
pbcsSearchIn[ in out ] A pointer to a P6BCSTR structure describing the binary string to be searched. On exit, the pString member pointer of the P6BCSTR will be modified to point at the next character in the string to be searched or NULL if the end of the string was reached.
pbcsSearchSet[ in ] A pointer to a P6BCSTR containing the set of characters to match. The may contain the NULL character (zero).
pbcsFound[ out ] The address of a P6BCSTR structure which on success will be populated with a pointer to matching character. You MUST not assume that pbcsToken->pString will point into pbcsSearchIn->pString. As a result, you MUST not use the pointer value returned in any pointer arithmetic with pbcsSearchIn.
Returns
SuccessP6R::eOkIndicates a match was found. The P6BCSTR pointed to by pbcsFound has been updated and pcbsSearchIn now points to the next character to search.
FailureP6R::eInvalidArgpbcsSearchIn is NULL or pcbsSearchSet or one of its members is NULL or zero or pcbsFound is NULL.
P6R::eEndOfRecordNo matches were found and the end of the string was reached.