Intel® Integrated Performance Primitives Developer Guide and Reference

ID 790148
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Concat

DEPRECATED. Concatenates several strings together.

Syntax

IppStatus ippsConcat_8u_D2L(const Ipp8u* const pSrc[], const int srcLen[], int numSrc, Ipp8u* pDst);

IppStatus ippsConcat_8u(const Ipp8u* pSrc1, int len1, const Ipp8u* pSrc2, int len2, Ipp8u* pDst);

Include Files

ippch.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pSrc1

Pointer to the first source string.

len1

Number of elements in the first string.

pSrc2

Pointer to the second source string.

len2

Number of elements in the second string.

pSrc

Pointer to the array of source strings.

srcLen

Pointer to the array of lengths of the source strings.

numSrc

Number of source strings.

pDst

Pointer to the destination string.

Description

NOTE:
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 concatenates several strings together. Functions with D2L suffix operate with multiple numSrc strings pSrc[], while functions without this suffix operate with two strings pSrc1 and pSrc2 only. Resulting string is stored in the pDst. Necessary memory blocks must be allocated for the destination string before the function is called. Summary length of the strings to be concatenated can not be greater than IPP_MAX_32S.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified pointers is NULL.

ippStsLengthErr

Indicates an error condition if len1 or len2 is negative, or srcLen[i] is negative for i < numSrc.

ippStsSizeErr

Indicates an error condition if numSrc is equal to or less than 0.

Example

The code example below shows how to use the functions ippsConcat_8u and ippsConcat_8u_D2L.

 Ipp8u string0[] = "This is the initial string."; 
Ipp8u string1[] = "Extra text added to the string..."; 
Ipp8u* string_ptr [2] = { string0, string1 };
int string_len_ptr [2] = { sizeof (string0) - 1, sizeof (string1)};
Ipp8u dst_string [ sizeof (string0) + sizeof (string1)];

ippsConcat_8u( string0, sizeof (string0) - 1, string1, sizeof (string1), dst_string ); 
printf ("ippsConcat_8u said: %s\n", (char*) dst_string ); 
ippsConcat_8u_D2L( string_ptr , string_len_ptr , 2, dst_string ); 
printf ("ippsConcat_8u_D2L said: %s\n", (char*) dst_string ); 
ippsConcatC_8u_D2L( string_ptr , string_len_ptr, 2, '#', dst_string ); 
printf ("ippsConcatC_8u_D2L said: %s\n", (char*) dst_string );

Output: 
ippsConcat_8u said: This is the initial string. Extra text added to the string... 
ippsConcat_8u_D2L said: This is the initial string. Extra text added to the string... 
ippsConcatC_8u_D2L said: This is the initial string. # Extra text added to the string...