FindC, FindRevC

Looks for the first occurrence of the specified element within the source string.

Syntax

IppStatus ippsFindC_8u(const Ipp8u* pSrc, int len, Ipp8u valFind, int* pIndex);

IppStatus ippsFindC_Z_8u(const Ipp8u* pSrcZ, Ipp8u valFind, int* pIndex);

IppStatus ippsFindRevC_8u(const Ipp8u* pSrc, int len, Ipp8u valFind, int* pIndex);

THE FOLLOWING FUNCTIONS ARE DEPRECATED:

IppStatus ippsFindC_16u(const Ipp16u* pSrc, int len, Ipp16u valFind, int* pIndex);

IppStatus ippsFindC_Z_16u(const Ipp16u* pSrcZ, Ipp16u valFind, int* pIndex);

IppStatus ippsFindRevC_16u(const Ipp16u* pSrc, int len, Ipp16u valFind, int* pIndex);

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.

pSrcZ

Pointer to the source zero-ended string.

len

Number of elements in the source string.

valFind

Value of the specified element.

pIndex

Pointer to the result index.

Description

Functions ippsFindC_16u, ippsFindC_Z_16u, and ippsFindRevC_16u are deprecated. The support of 16u char is obsolete and will be removed in a future release. Use the following link for details:http://software.intel.com/sites/products/ipp-deprecated-features-feedback/.

Functions ippsFindC and ippsFindRevC are declared in the ippch.h file. These functions search through the source string pSrc for the first occurrence of the specified element with the value valFind. The position of this element is stored in pIndex. If no matching element is found, then pIndex is set to -1. The function flavor ippsFindC_Z operates with the zero-ended source string. The function ippsFindRevC searches the source string in the reverse direction. The search is case-sensitive.

Code example  shows how to use the function ippsFindC_Z_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 len is negative.
For more complete information about compiler optimizations, see our Optimization Notice.