CompareIgnoreCase, CompareIgnoreCaseLatin

Compares two strings of the fixed length ignoring case.

Syntax

IppStatus ippsCompareIgnoreCase_16u(const Ipp16u* pSrc1, const Ipp16u* pSrc2, int len, int* pResult);

IppStatus ippsCompareIgnoreCaseLatin_8u(const Ipp8u* pSrc1, const Ipp8u* pSrc2, int len, int* pResult);

IppStatus ippsCompareIgnoreCaseLatin_16u(const Ipp16u* pSrc1, const Ipp16u* pSrc2, int len, int* pResult);

Parameters

pSrc1

Pointer to the first source string.

pSrc2

Pointer to the second source string.

len

Maximum number of elements to be compared.

pResult

Pointer to the result.

Description

The functions ippsCompareIgnoreCase and ippsCompareIgnoreCaseLatin are declared in the ippch.h file. These functions compare first len elements of two strings pSrc1 and pSrc2. If all pairs of elements in the strings are equal, the function returns pResult = 0. If the pair of non-matching elements occurs in the i-th position, the function stops operation and returns pResult. The returned value is positive when pSrc1[i]> pSrc2[i] and negative when pSrc1[i]< pSrc2[i]. The comparison is case-insensitive.

The function ippsCompareIgnore operates with Unicode characters. The function ippsCompareIgnoreLatin operates with ASCII characters.

Code example shows how to use the function ippsCompareIgnoreCaseLatin_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.

Submit feedback on this help topic

Copyright © 2000 - 2010, Intel Corporation. All rights reserved.