Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_DRAFT const UNormalizer2* U_EXPORT2 unorm2_getInstance ( const char *  packageName,
const char *  name,
UNormalization2Mode  mode,
UErrorCode pErrorCode 

Returns a UNormalizer2 instance which uses the specified data file (packageName/name similar to ucnv_openPackage() and ures_open()/ResourceBundle) and which composes or decomposes text according to the specified mode. Returns an unmodifiable singleton instance. Do not delete it.

Use packageName=NULL for data files that are part of ICU's own data. Use name="nfc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFC/NFD. Use name="nfkc" and UNORM2_COMPOSE/UNORM2_DECOMPOSE for Unicode standard NFKC/NFKD. Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=NFKC_Casefold.

packageName NULL for ICU built-in data, otherwise application data package name
name "nfc" or "nfkc" or "nfkc_cf" or name of custom data file
mode normalization mode (compose or decompose etc.)
pErrorCode Standard ICU error code. Its input value must pass the U_SUCCESS() test, or else the function returns immediately. Check for U_FAILURE() on output or use with function chaining. (See User Guide for details.)
the requested UNormalizer2, if successful ICU 4.4

Definition at line 623 of file normalizer2.cpp.

References Normalizer2::getInstance().

    return (const UNormalizer2 *)Normalizer2::getInstance(packageName, name, mode, *pErrorCode);

Generated by  Doxygen 1.6.0   Back to index