Developer Reference

  • 2020
  • 07/15/2020
  • Public Content
Contents

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 is deprecated and will be removed in a future release. If you have concerns, open a ticket and provide feedback at https://supporttickets.intel.com/.
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 .

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804