Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ISplit::split ( const P6CHAR pRegex,
P6REGEXMODIFIER  modifiers,
const P6CHAR pTargetStr,
P6UINT32  chunkLimit,
p6IEnumSplitChunks **  ppEnum 
)
pure virtual

A narrow character split parsing funtion.

See the definition of the p6ISplit interface. This function requires the caller to use Perl regular expressions.

If the provided regular expression contains capturing parentheses (e.g., (\x)*) then (as in the Perl Split function), all captured text will be included as P6SPLITCHUNKS in the enumerator. The captured text will appear right after each normal chunked data. This extra data can be avoided by the use of non-capturing parenthese [i.e., (?: ) ].

If the provided regular expression does not result in any matches, then the original target string (pTargetStr) input is returned as a single chunk.

Parameters
pRegex[ in ] The Perl regular expression used to parse the target string.
modifiers[ in ] A bit mask that defines how the regex engine performs the match (see p6IRegex)
pTargetStr[ in ] The target string to parse.
chunkLimit[ in ] The caller can control the number of chunks pulled out of the target string. A value of zero means no limit. If a chunk limit is set (e.g., 3) the last chunk returned will include the remaining part of the target string. For example in the example used above, if chunk limit was set to 3 then the results returned would have been: <0,3> <4,3> <8,9>
ppEnum[ out ] The returned parsed chunks.
Returns
SuccessP6R::eOk 
FailureP6R::eInvalidArgOne of the parameters is NULL.
P6R::eNotInitializedA successful call to initialize has not been done.