ICU 73.2  73.2
ucasemap.h
Go to the documentation of this file.
00001 // © 2016 and later: Unicode, Inc. and others.
00002 // License & terms of use: http://www.unicode.org/copyright.html
00003 /*
00004 *******************************************************************************
00005 *
00006 *   Copyright (C) 2005-2012, International Business Machines
00007 *   Corporation and others.  All Rights Reserved.
00008 *
00009 *******************************************************************************
00010 *   file name:  ucasemap.h
00011 *   encoding:   UTF-8
00012 *   tab size:   8 (not used)
00013 *   indentation:4
00014 *
00015 *   created on: 2005may06
00016 *   created by: Markus W. Scherer
00017 *
00018 *   Case mapping service object and functions using it.
00019 */
00020 
00021 #ifndef __UCASEMAP_H__
00022 #define __UCASEMAP_H__
00023 
00024 #include "unicode/utypes.h"
00025 #include "unicode/stringoptions.h"
00026 #include "unicode/ustring.h"
00027 
00028 #if U_SHOW_CPLUSPLUS_API
00029 #include "unicode/localpointer.h"
00030 #endif   // U_SHOW_CPLUSPLUS_API
00031 
00050 struct UCaseMap;
00051 typedef struct UCaseMap UCaseMap; 
00075 U_CAPI UCaseMap * U_EXPORT2
00076 ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode);
00077 
00083 U_CAPI void U_EXPORT2
00084 ucasemap_close(UCaseMap *csm);
00085 
00086 #if U_SHOW_CPLUSPLUS_API
00087 
00088 U_NAMESPACE_BEGIN
00089 
00099 U_DEFINE_LOCAL_OPEN_POINTER(LocalUCaseMapPointer, UCaseMap, ucasemap_close);
00100 
00101 U_NAMESPACE_END
00102 
00103 #endif
00104 
00111 U_CAPI const char * U_EXPORT2
00112 ucasemap_getLocale(const UCaseMap *csm);
00113 
00120 U_CAPI uint32_t U_EXPORT2
00121 ucasemap_getOptions(const UCaseMap *csm);
00122 
00134 U_CAPI void U_EXPORT2
00135 ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode);
00136 
00148 U_CAPI void U_EXPORT2
00149 ucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode);
00150 
00151 #if !UCONFIG_NO_BREAK_ITERATION
00152 
00160 U_CAPI const UBreakIterator * U_EXPORT2
00161 ucasemap_getBreakIterator(const UCaseMap *csm);
00162 
00183 U_CAPI void U_EXPORT2
00184 ucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode);
00185 
00232 U_CAPI int32_t U_EXPORT2
00233 ucasemap_toTitle(UCaseMap *csm,
00234                  UChar *dest, int32_t destCapacity,
00235                  const UChar *src, int32_t srcLength,
00236                  UErrorCode *pErrorCode);
00237 
00238 #endif  // UCONFIG_NO_BREAK_ITERATION
00239 
00263 U_CAPI int32_t U_EXPORT2
00264 ucasemap_utf8ToLower(const UCaseMap *csm,
00265                      char *dest, int32_t destCapacity,
00266                      const char *src, int32_t srcLength,
00267                      UErrorCode *pErrorCode);
00268 
00292 U_CAPI int32_t U_EXPORT2
00293 ucasemap_utf8ToUpper(const UCaseMap *csm,
00294                      char *dest, int32_t destCapacity,
00295                      const char *src, int32_t srcLength,
00296                      UErrorCode *pErrorCode);
00297 
00298 #if !UCONFIG_NO_BREAK_ITERATION
00299 
00344 U_CAPI int32_t U_EXPORT2
00345 ucasemap_utf8ToTitle(UCaseMap *csm,
00346                     char *dest, int32_t destCapacity,
00347                     const char *src, int32_t srcLength,
00348                     UErrorCode *pErrorCode);
00349 
00350 #endif
00351 
00382 U_CAPI int32_t U_EXPORT2
00383 ucasemap_utf8FoldCase(const UCaseMap *csm,
00384                       char *dest, int32_t destCapacity,
00385                       const char *src, int32_t srcLength,
00386                       UErrorCode *pErrorCode);
00387 
00388 #endif