Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 6/24/2024
Public

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

Document Table of Contents

TrimCAny, TrimStartCAny, TrimEndCAny

DEPRECATED. Delete all occurrences of any of the specified symbols in the beginning and in the end of the source string.

Syntax

IppStatus ippsTrimCAny_8u(const Ipp8u* pSrc, int srcLen, const Ipp8u* pTrim, int trimLen, Ipp8u* pDst, int* pDstLen);

IppStatus ippsTrimStartCAny_8u(const Ipp8u* pSrc, int srcLen, const Ipp8u* pTrim, int trimLen, Ipp8u* pDst, int* pDstLen);

IppStatus ippsTrimEndCAny_8u(const Ipp8u* pSrc, int srcLen, const Ipp8u* pTrim, int trimLen, Ipp8u* pDst, int* pDstLen);

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.

pTrim

Pointer to the array containing the specified elements.

trimLen

Number of elements in the array.

pDst

Pointer to the destination string.

pDstLen

Pointer to the computed number of elements in the destination string.

Description

NOTE:
These functions are deprecated and will be removed in a future release. If you have concerns, open a ticket and provide feedback at https://supporttickets.intel.com/.

The function ippsTrimCAny deletes all occurrences of any of the specified elements stored in the array pTrim if they are present either in the beginning or in the end of the source string pSrc, and stores the result string containing pDstLen elements in pDst. The function stops operation when it finds the first non-matching element. The functions ippsTrimStartCAny and ippsTrimEndCAny perform this operation only in the beginning or in the end of the source string pSrc, respectively. The operation is case-sensitive.

Code example  shows how to use the function ippsTrimCAny_8u.

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 srcLen or trimLen is negative.