-bool QIcu::strcoll(const QByteArray &localeID,
- const QChar *source, int sourceLength, const QChar *target, int targetLength, int *result)
-{
- Q_ASSERT(result);
- Q_ASSERT(source);
- Q_ASSERT(target);
-
- UErrorCode icuStatus = U_ZERO_ERROR;
- UCollator *collator = ucol_open(localeID, &icuStatus);
-
- if (U_FAILURE((icuStatus)))
- return false;
-
- *result = ucol_strcoll(collator,
- reinterpret_cast<const UChar *>(source), int32_t(sourceLength),
- reinterpret_cast<const UChar *>(target), int32_t(targetLength));
-
- ucol_close(collator);
-
- return true;
-}
-