ICU-2416 ucol_primaryOrder, ucol_secondaryOrder, ucol_tertiaryOrder APIs for easier separation of API and internal tests.

X-SVN-Rev: 11626
This commit is contained in:
Vladimir Weinstein 2003-04-23 04:47:00 +00:00
parent 720401b4b5
commit 657945ed51
2 changed files with 47 additions and 0 deletions

View File

@ -245,4 +245,24 @@ ucol_setOffset(UCollationElements *elems,
ci->fcdPosition = NULL;
}
U_CAPI int32_t U_EXPORT2
ucol_primaryOrder (int32_t order)
{
order &= UCOL_PRIMARYMASK;
return (order >> UCOL_PRIMARYMASK);
}
U_CAPI int32_t U_EXPORT2
ucol_secondaryOrder (int32_t order)
{
order &= UCOL_SECONDARYMASK;
return (order >> UCOL_SECONDARYMASK);
}
U_CAPI int32_t U_EXPORT2
ucol_tertiaryOrder (int32_t order)
{
return (order & UCOL_TERTIARYMASK);
}
#endif /* #if !UCONFIG_NO_COLLATION */

View File

@ -236,6 +236,33 @@ ucol_setOffset(UCollationElements *elems,
int32_t offset,
UErrorCode *status);
/**
* Get the primary order of a collation order.
* @param order the collation order
* @return the primary order of a collation order.
* @draft ICU 2.6
*/
U_CAPI int32_t U_EXPORT2
ucol_primaryOrder (int32_t order);
/**
* Get the secondary order of a collation order.
* @param order the collation order
* @return the secondary order of a collation order.
* @draft ICU 2.6
*/
U_CAPI int32_t U_EXPORT2
ucol_secondaryOrder (int32_t order);
/**
* Get the tertiary order of a collation order.
* @param order the collation order
* @return the tertiary order of a collation order.
* @draft ICU 2.6
*/
U_CAPI int32_t U_EXPORT2
ucol_tertiaryOrder (int32_t order);
#endif /* #if !UCONFIG_NO_COLLATION */
#endif