Visible to Intel only — GUID: GUID-6037CFF6-F493-431D-9A71-F6F560D695D9
Visible to Intel only — GUID: GUID-6037CFF6-F493-431D-9A71-F6F560D695D9
ReplaceC
DEPRECATED. Replaces all occurrences of a specified element in the source string with another element.
Syntax
IppStatus ippsReplaceC_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len, Ipp8u oldVal, Ipp8u newVal);
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. |
len |
Number of elements in the source string. |
pDst |
Pointer to the destination string. |
oldVal |
Element to be replaced. |
newVal |
Element that replaces oldVal. |
Description
This function replaces all occurrences of a specified element oldVal in the source string pSrc with another specified element newVal, and stores the new string in the pDst. 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 len is negative. |
Example
The code example below shows how to use the function ippsReplaceC_8u.
Ipp8u string[] = "abracadabra"; Ipp8u dst_string [ sizeof (string)]; ippsReplaceC_8u( string, dst_string , sizeof (string), 'a', 'o' ); printf ( "ippsReplaceC_8u returned: %s.\n", (char*) dst_string ); Output: ippsReplaceC_8u returned: obrocodobro.