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

utrans.h File Reference

Detailed Description

C API: Transliterator.


The data structures and functions described in this header provide transliteration services. Transliteration services are implemented as C++ classes. The comments and documentation in this header assume the reader is familiar with the C++ headers translit.h and associated documentation.

A significant but incomplete subset of the C++ transliteration services are available to C code through this header. In order to access more complex transliteration services, refer to the C++ headers and documentation.

There are two sets of functions for working with transliterator IDs:

An old, deprecated set uses char * IDs, which works for true and pure identifiers that these APIs were designed for, for example "Cyrillic-Latin". It does not work when the ID contains filters ("[:Script=Cyrl:]") or even a complete set of rules because then the ID string contains more than just "invariant" characters (see utypes.h).

A new set of functions replaces the old ones and uses UChar * IDs, paralleling the UnicodeString IDs in the C++ API. (New in ICU 2.8.)

Definition in file utrans.h.

#include "unicode/utypes.h"
#include "unicode/localpointer.h"
#include "unicode/urep.h"
#include "unicode/parseerr.h"
#include "unicode/uenum.h"

Go to the source code of this file.


struct  UTransPosition


typedef void * UTransliterator




U_STABLE UTransliterator *U_EXPORT2 utrans_clone (const UTransliterator *trans, UErrorCode *status)
U_STABLE void U_EXPORT2 utrans_close (UTransliterator *trans)
U_STABLE int32_t U_EXPORT2 utrans_countAvailableIDs (void)
U_DEPRECATED int32_t U_EXPORT2 utrans_getAvailableID (int32_t index, char *buf, int32_t bufCapacity)
U_DEPRECATED int32_t U_EXPORT2 utrans_getID (const UTransliterator *trans, char *buf, int32_t bufCapacity)
U_STABLE const UChar *U_EXPORT2 utrans_getUnicodeID (const UTransliterator *trans, int32_t *resultLength)
U_DEPRECATED UTransliterator
utrans_open (const char *id, UTransDirection dir, const UChar *rules, int32_t rulesLength, UParseError *parseError, UErrorCode *status)
U_STABLE UEnumeration *U_EXPORT2 utrans_openIDs (UErrorCode *pErrorCode)
U_STABLE UTransliterator *U_EXPORT2 utrans_openInverse (const UTransliterator *trans, UErrorCode *status)
U_STABLE UTransliterator *U_EXPORT2 utrans_openU (const UChar *id, int32_t idLength, UTransDirection dir, const UChar *rules, int32_t rulesLength, UParseError *parseError, UErrorCode *pErrorCode)
U_STABLE void U_EXPORT2 utrans_register (UTransliterator *adoptedTrans, UErrorCode *status)
U_STABLE void U_EXPORT2 utrans_setFilter (UTransliterator *trans, const UChar *filterPattern, int32_t filterPatternLen, UErrorCode *status)
U_STABLE void U_EXPORT2 utrans_trans (const UTransliterator *trans, UReplaceable *rep, UReplaceableCallbacks *repFunc, int32_t start, int32_t *limit, UErrorCode *status)
U_STABLE void U_EXPORT2 utrans_transIncremental (const UTransliterator *trans, UReplaceable *rep, UReplaceableCallbacks *repFunc, UTransPosition *pos, UErrorCode *status)
U_STABLE void U_EXPORT2 utrans_transIncrementalUChars (const UTransliterator *trans, UChar *text, int32_t *textLength, int32_t textCapacity, UTransPosition *pos, UErrorCode *status)
U_STABLE void U_EXPORT2 utrans_transUChars (const UTransliterator *trans, UChar *text, int32_t *textLength, int32_t textCapacity, int32_t start, int32_t *limit, UErrorCode *status)
U_DEPRECATED void U_EXPORT2 utrans_unregister (const char *id)
U_STABLE void U_EXPORT2 utrans_unregisterID (const UChar *id, int32_t idLength)

Generated by  Doxygen 1.6.0   Back to index