int32 NormalizeString(NormalizationForm normalizationForm, const char16* sourceString, uint32 sourceLength, char16* destString, int32 destLength, ApiError* pErrorOut)
        {
            *pErrorOut = ApiError::NoError;
            if (destString == nullptr)
            {
                return sourceLength;
            }

            int32 len = (int32) minm(minm(destLength, sourceLength), INT_MAX);
            memcpy(destString, sourceString, len * sizeof(char16));

            return len;
        }
        int32 ChangeStringLinguisticCase(CaseFlags caseFlags, const char16* sourceString, uint32 sourceLength, char16* destString, uint32 destLength, ApiError* pErrorOut)
        {
            *pErrorOut = ApiError::NoError;
            if (destString == nullptr)
            {
                return sourceLength;
            }

            int32 len = (int32) minm(minm(destLength, sourceLength), INT_MAX);
            ToUPorLOW fnc = caseFlags == CaseFlagsLower ? PAL_towlower : PAL_towupper;
            for (int32 i = 0; i < len; i++)
            {
                destString[i] = fnc(sourceString[i]);
            }

            return len;
        }
Beispiel #3
0
void getRange(
	double *pMx,
	double *pMn,
	double *pX,
	int k
)
{
	int i;

	for (i=0;i<k;i++) {
		pMx[i]=maxm(pMx[i],pX[i]);
		pMn[i]=minm(pMn[i],pX[i]);
	}

}