Developer Reference for Intel® Integrated Performance Primitives
DEPRECATED. Performs find and replace operation.
IppStatus ippsRegExpReplace_8u(const Ipp8u* pSrc, int* pSrcLenOffset, Ipp8u* pDst, int* pDstLen, IppRegExpFind* pFind, int* pNumFind, IppRegExpState* pRegExpState, IppRegExpReplaceState* pReplaceState);
ippch.h
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
pSrc |
Pointer to the source string. |
pSrcLenOffset |
Pointer to length of the pSrc vector on input; its used length on output. |
pDst |
Pointer to the destination string. |
pDstLen |
Pointer to length of the pDst vector on input; its used length on output. |
pFind |
Array of pointers to the matching substrings. |
pNumFind |
Pointer to size of the array pFind on input, to number of matching substrings on output. |
pRegExpState |
Pointer to the compiled pattern structure. |
pReplaceState |
Pointer to the state structure for the find and replace operation. |
This function search through the pSrcLen elements of the source string pSrc for substrings that match the specified regular expression in accordance with the regular expression pattern that is stored in the structure pRegExpState. This state structure must be initialized by the ippsRegExpInit function beforehand. All found matches are replaced according to the replacement pattern that is stored in the structure pReplaceState. This structure must be initialized beforehand by the function ippsRegExpReplaceInit.
Initially the parameter pNumFind specifies the size of array pFind, the output parameter pNumFind returns the number of the matching substrings. pFind->pFind specifies the offset of the pointer to the matching substring, and pFind->lenFind - number of elements in the matching substring. pFind [0] points to the substring that matches the whole regular expression, pFind[1] points to the substring that matches the first grouping, pFind [2] points to the substring that matches the second grouping, and so on.
The compiled regular expression pattern and/or replacement pattern can be used for different input strings in different combinations.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when one of the specified pointers is NULL. |
ippStsSizeErr |
Indicates an error when pSrcLen or pDstLen is less than or equal to zero. |