Visible to Intel only — GUID: GUID-1FC4545D-6454-4A7F-9DB3-A0AA5579BCB1
Visible to Intel only — GUID: GUID-1FC4545D-6454-4A7F-9DB3-A0AA5579BCB1
Insert
DEPRECATED. Inserts a string into another string.
Syntax
IppStatus ippsInsert_8u(const Ipp8u* pSrc, int srcLen, const Ipp8u* pInsert, int insertLen, Ipp8u* pDst, int startIndex);
IppStatus ippsInsert_8u_I(const Ipp8u* pInsert, int insertLen, Ipp8u* pSrcDst, int* pSrcDstLen, int startIndex);
Include Files
ippch.h
Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Parameters
pSrc |
Pointer to the source string. |
srcLen |
Number of elements in the source string. |
pInsert |
Pointer to the string to be inserted. |
insertLen |
Number of elements in the string to be inserted. |
pDst |
Pointer to the destination string. |
pSrcDst |
Pointer to the source and destination string for in-place operation. |
pSrcDstLen |
Pointer to the number of elements in the source and destination string for in-place operation. |
startIndex |
Index of the insertion point. |
Description
This function inserts the string pInsert containing insertLen elements into a source string pSrc of length srcLen. Insertion position is specified by startIndex. The result is stored in the pDst.
The in-place flavors of ippsInsert insert the string pInsert in the source string pSrcDst and store the result in the destination string pSrcDst.
Return Values
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error condition if one of the specified pointers is NULL. |
ippStsLengthErr |
Indicates an error condition if one of the srcLen, insertLen, pSrcSdtLen, startIndex is negative, or startIndex is greater than srcLen or pSrcDstLen. |
Example
The code example below shows how to use the function ippsInsert_8u.
Ipp8u string[] = " 1st string part 2nd string part "; Ipp8u substring[] = " substring "; Ipp8u dst_string [ sizeof (string) + sizeof (substring) - 1]; int dst_string_len ; ippsInsert_8u( string, sizeof (string) - 1, substring, sizeof (substring) - 1, dst_string , 16 ); dst_string [ sizeof ( dst_string ) - 1] = 0; printf ( "ippsInsert_8u returned: %s.\n", (char*) dst_string ); dst_string_len = sizeof ( dst_string ) - 1; ippsRemove_8u_I( dst_string , & dst_string_len , 16, sizeof (substring) - 1 ); dst_string [ dst_string_len ] = 0; printf ( "ippsRemove_8u_I returned: %s.\n", (char*) dst_string );
Result:
ippsInsert_8u returned: 1st string part substring 2nd string part . ippsRemove_8u_I returned: 1st string part 2nd string part .