Developer Reference

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

TrimC

DEPRECATED. Deletes all occurrences of a specified symbol in the beginning and in the end of the string.

Syntax

IppStatus ippsTrimC_8u(const Ipp8u*
pSrc
, int
srcLen
, Ipp8u
odd
, Ipp8u*
pDst
, int*
pDstLen
);
IppStatus ippsTrimC_8u_I(Ipp8u*
pSrcDst
, int*
pLen
, Ipp8u
odd
);
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.
pSrcDst
Pointer to the source and destination string for the in-place operation.
pDst
Pointer to the destination string.
pDstLen
Pointer to the computed number of elements in the destination string.
pLen
Pointer to the number of elements in the source and destination string for the in-place operation.
odd
Symbol to be deleted.
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 deletes all occurrences of a specified symbol
odd
if it is present in the beginning and in the end of the source string
pSrc
containing
srcLen
elements. The function stores the result string containing
pDstLen
elements in
pDst
.
The in-place flavors of
ippsTrimC
delete all occurrences of a specified symbol
odd
if it is present in the beginning and in the end of the source string
pSrcDst
containing
pLen
elements. These functions store the result string containing
pLen
elements in
pSrcDst
.
The operation is case-sensitive.
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
pLen
is negative.

Example

The code example below shows how to use the function
ippsTrimC_8u_I
.
Ipp8u string[] = " ### abracadabra $$$ "; Ipp8u trim[] = " $#* "; Ipp8u dst_string [ sizeof (string)]; int string_len , dst_string_len ; ippsTrimCAny_8u( string, sizeof (string) - 1, trim, sizeof (string) - 1, dst_string,& dst_string_len ); dst_string [ dst_string_len ] = 0; printf ( "ippsTrimCAny_8u returned: %s.\n", (char*) dst_string ); string_len = sizeof (string) - 1; ippsTrimC_8u_I( string, & string_len , ' # ' ); string[ string_len ] = 0; printf ( "ippsTrimC_8u_I returned: %s.\n", (char*)string );
Result:
ippsTrimCAny_8u returned: abracadabra . ippsTrimC_8u_I returned: abracadabra$$$ .

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