1b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/* 2b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru******************************************************************************* 3b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* 454dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius* Copyright (C) 2005-2012, International Business Machines 5b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* Corporation and others. All Rights Reserved. 6b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* 7b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru******************************************************************************* 8b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* file name: ucasemap.h 9b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* encoding: US-ASCII 10b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* tab size: 8 (not used) 11b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* indentation:4 12b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* 13b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* created on: 2005may06 14b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* created by: Markus W. Scherer 15b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* 16b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru* Case mapping service object and functions using it. 17b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru*/ 18b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 19b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#ifndef __UCASEMAP_H__ 20b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define __UCASEMAP_H__ 21b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 22b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "unicode/utypes.h" 23b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#include "unicode/ustring.h" 2450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho#include "unicode/localpointer.h" 25b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 26b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 27b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * \file 28b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * \brief C API: Unicode case mapping functions using a UCaseMap service object. 29b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 30b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The service object takes care of memory allocations, data loading, and setup 31b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * for the attributes, as usual. 32b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 33b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Currently, the functionality provided here does not overlap with uchar.h 34b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * and ustring.h, except for ucasemap_toTitle(). 35b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 36b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * ucasemap_utf8XYZ() functions operate directly on UTF-8 strings. 37b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 38b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 39b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 40b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * UCaseMap is an opaque service object for newer ICU case mapping functions. 41b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Older functions did not use a service object. 42b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 43b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 44b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querustruct UCaseMap; 45b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Querutypedef struct UCaseMap UCaseMap; /**< C typedef for struct UCaseMap. @stable ICU 3.4 */ 46b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 47b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 48b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Open a UCaseMap service object for a locale and a set of options. 49b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The locale ID and options are preprocessed so that functions using the 50b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * service object need not process them in each call. 51b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 52b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param locale ICU locale ID, used for language-dependent 53b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * upper-/lower-/title-casing according to the Unicode standard. 54b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Usual semantics: ""=root, NULL=default locale, etc. 55b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param options Options bit set, used for case folding and string comparisons. 56b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Same flags as for u_foldCase(), u_strFoldCase(), 57b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * u_strCaseCompare(), etc. 58b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Use 0 or U_FOLD_CASE_DEFAULT for default behavior. 59b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param pErrorCode Must be a valid pointer to an error code value, 60b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * which must not indicate a failure before the function call. 61b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return Pointer to a UCaseMap service object, if successful. 62b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 63b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see U_FOLD_CASE_DEFAULT 64b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see U_FOLD_CASE_EXCLUDE_SPECIAL_I 65b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see U_TITLECASE_NO_LOWERCASE 66b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see U_TITLECASE_NO_BREAK_ADJUSTMENT 67b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 68b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 69b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_STABLE UCaseMap * U_EXPORT2 70b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode); 71b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 72b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 73b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Close a UCaseMap service object. 74b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param csm Object to be closed. 75b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 76b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 77b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_STABLE void U_EXPORT2 78b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_close(UCaseMap *csm); 79b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 8050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho#if U_SHOW_CPLUSPLUS_API 8150294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 8250294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoU_NAMESPACE_BEGIN 8350294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 8450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho/** 8550294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * \class LocalUCaseMapPointer 8650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * "Smart pointer" class, closes a UCaseMap via ucasemap_close(). 8750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * For most methods see the LocalPointerBase base class. 8850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * 8950294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @see LocalPointerBase 9050294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho * @see LocalPointer 9127f654740f2a26ad62a5c155af9199af9e69b889claireho * @stable ICU 4.4 9250294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho */ 9350294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoU_DEFINE_LOCAL_OPEN_POINTER(LocalUCaseMapPointer, UCaseMap, ucasemap_close); 9450294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 9550294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoU_NAMESPACE_END 9650294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 9750294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho#endif 9850294ead5e5d23f5bbfed76e00e6b510bd41eee1claireho 99b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 100b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Get the locale ID that is used for language-dependent case mappings. 101b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param csm UCaseMap service object. 102b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return locale ID 103b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 104b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 105b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_STABLE const char * U_EXPORT2 106b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_getLocale(const UCaseMap *csm); 107b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 108b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 109b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Get the options bit set that is used for case folding and string comparisons. 110b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param csm UCaseMap service object. 111b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return options bit set 112b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 113b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 114b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_STABLE uint32_t U_EXPORT2 115b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_getOptions(const UCaseMap *csm); 116b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 117b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 118b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Set the locale ID that is used for language-dependent case mappings. 119b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 120b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param csm UCaseMap service object. 121b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param locale Locale ID, see ucasemap_open(). 122b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param pErrorCode Must be a valid pointer to an error code value, 123b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * which must not indicate a failure before the function call. 124b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 125b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see ucasemap_open 126b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 127b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 128b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_STABLE void U_EXPORT2 129b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode); 130b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 131b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 132b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Set the options bit set that is used for case folding and string comparisons. 133b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 134b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param csm UCaseMap service object. 135b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param options Options bit set, see ucasemap_open(). 136b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param pErrorCode Must be a valid pointer to an error code value, 137b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * which must not indicate a failure before the function call. 138b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 139b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see ucasemap_open 140b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 141b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 142b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_STABLE void U_EXPORT2 143b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_setOptions(UCaseMap *csm, uint32_t options, UErrorCode *pErrorCode); 144b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 145b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 146b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Do not lowercase non-initial parts of words when titlecasing. 147b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Option bit for titlecasing APIs that take an options bit set. 148b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 149b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * By default, titlecasing will titlecase the first cased character 150b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * of a word and lowercase all other characters. 151b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * With this option, the other characters will not be modified. 152b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 153b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see ucasemap_setOptions 154b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see ucasemap_toTitle 155b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see ucasemap_utf8ToTitle 156b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see UnicodeString::toTitle 157b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @stable ICU 3.8 158b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 159b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define U_TITLECASE_NO_LOWERCASE 0x100 160b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 161b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 162b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Do not adjust the titlecasing indexes from BreakIterator::next() indexes; 163b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * titlecase exactly the characters at breaks from the iterator. 164b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Option bit for titlecasing APIs that take an options bit set. 165b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 166b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * By default, titlecasing will take each break iterator index, 167b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * adjust it by looking for the next cased character, and titlecase that one. 168b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Other characters are lowercased. 169b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 170b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * This follows Unicode 4 & 5 section 3.13 Default Case Operations: 171b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 172b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * R3 toTitlecase(X): Find the word boundaries based on Unicode Standard Annex 173b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * #29, "Text Boundaries." Between each pair of word boundaries, find the first 174b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * cased character F. If F exists, map F to default_title(F); then map each 175b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * subsequent character C to default_lower(C). 176b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 177b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see ucasemap_setOptions 178b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see ucasemap_toTitle 179b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see ucasemap_utf8ToTitle 180b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see UnicodeString::toTitle 181b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see U_TITLECASE_NO_LOWERCASE 182b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @stable ICU 3.8 183b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 184b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#define U_TITLECASE_NO_BREAK_ADJUSTMENT 0x200 185b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 186b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#if !UCONFIG_NO_BREAK_ITERATION 187b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 188b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 189b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Get the break iterator that is used for titlecasing. 190b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Do not modify the returned break iterator. 191b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param csm UCaseMap service object. 192b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return titlecasing break iterator 193b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @stable ICU 3.8 194b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 19550294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoU_STABLE const UBreakIterator * U_EXPORT2 196b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_getBreakIterator(const UCaseMap *csm); 197b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 198b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 199b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Set the break iterator that is used for titlecasing. 200b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The UCaseMap service object releases a previously set break iterator 201b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * and "adopts" this new one, taking ownership of it. 202b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * It will be released in a subsequent call to ucasemap_setBreakIterator() 203b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * or ucasemap_close(). 204b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 205b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Break iterator operations are not thread-safe. Therefore, titlecasing 206b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * functions use non-const UCaseMap objects. It is not possible to titlecase 207b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * strings concurrently using the same UCaseMap. 208b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 209b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param csm UCaseMap service object. 210b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param iterToAdopt Break iterator to be adopted for titlecasing. 211b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param pErrorCode Must be a valid pointer to an error code value, 212b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * which must not indicate a failure before the function call. 213b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 214b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see ucasemap_toTitle 215b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see ucasemap_utf8ToTitle 216b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @stable ICU 3.8 217b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 21850294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoU_STABLE void U_EXPORT2 219b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_setBreakIterator(UCaseMap *csm, UBreakIterator *iterToAdopt, UErrorCode *pErrorCode); 220b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 221b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 222b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Titlecase a UTF-16 string. This function is almost a duplicate of u_strToTitle(), 223b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * except that it takes ucasemap_setOptions() into account and has performance 224b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * advantages from being able to use a UCaseMap object for multiple case mapping 225b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * operations, saving setup time. 226b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 227b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Casing is locale-dependent and context-sensitive. 228b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Titlecasing uses a break iterator to find the first characters of words 229b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * that are to be titlecased. It titlecases those characters and lowercases 230b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * all others. (This can be modified with ucasemap_setOptions().) 231b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 232b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * Note: This function takes a non-const UCaseMap pointer because it will 233b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * open a default break iterator if no break iterator was set yet, 234b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * and effectively call ucasemap_setBreakIterator(); 235b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * also because the break iterator is stateful and will be modified during 236b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * the iteration. 237b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * 238b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The titlecase break iterator can be provided to customize for arbitrary 239b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * styles, using rules and dictionaries beyond the standard iterators. 240b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The standard titlecase iterator for the root locale implements the 241b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * algorithm of Unicode TR 21. 242b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 243b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * This function uses only the setUText(), first(), next() and close() methods of the 244b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * provided break iterator. 245b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 246b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The result may be longer or shorter than the original. 247b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The source string and the destination buffer must not overlap. 248b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 249b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @param csm UCaseMap service object. This pointer is non-const! 250b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * See the note above for details. 251b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param dest A buffer for the result string. The result will be NUL-terminated if 252b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * the buffer is large enough. 253b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The contents is undefined in case of failure. 254b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param destCapacity The size of the buffer (number of bytes). If it is 0, then 255b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * dest may be NULL and the function will only return the length of the result 256b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * without writing any of the result string. 257b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param src The original string. 258b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. 259b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param pErrorCode Must be a valid pointer to an error code value, 260b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * which must not indicate a failure before the function call. 261b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return The length of the result string, if successful - or in case of a buffer overflow, 262b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * in which case it will be greater than destCapacity. 263b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 264b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see u_strToTitle 265b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @stable ICU 3.8 266b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 26750294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoU_STABLE int32_t U_EXPORT2 268b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_toTitle(UCaseMap *csm, 269b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UChar *dest, int32_t destCapacity, 270b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const UChar *src, int32_t srcLength, 271b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UErrorCode *pErrorCode); 272b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 273b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#endif 274b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 275b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 276b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Lowercase the characters in a UTF-8 string. 277b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Casing is locale-dependent and context-sensitive. 278b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The result may be longer or shorter than the original. 279b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The source string and the destination buffer must not overlap. 280b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 281b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param csm UCaseMap service object. 282b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param dest A buffer for the result string. The result will be NUL-terminated if 283b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * the buffer is large enough. 284b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The contents is undefined in case of failure. 285b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param destCapacity The size of the buffer (number of bytes). If it is 0, then 286b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * dest may be NULL and the function will only return the length of the result 287b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * without writing any of the result string. 288b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param src The original string. 289b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. 290b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param pErrorCode Must be a valid pointer to an error code value, 291b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * which must not indicate a failure before the function call. 292b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return The length of the result string, if successful - or in case of a buffer overflow, 293b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * in which case it will be greater than destCapacity. 294b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 295b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see u_strToLower 296b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 297b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 298b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_STABLE int32_t U_EXPORT2 299b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_utf8ToLower(const UCaseMap *csm, 300b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru char *dest, int32_t destCapacity, 301b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const char *src, int32_t srcLength, 302b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UErrorCode *pErrorCode); 303b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 304b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 305b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Uppercase the characters in a UTF-8 string. 306b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Casing is locale-dependent and context-sensitive. 307b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The result may be longer or shorter than the original. 308b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The source string and the destination buffer must not overlap. 309b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 310b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param csm UCaseMap service object. 311b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param dest A buffer for the result string. The result will be NUL-terminated if 312b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * the buffer is large enough. 313b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The contents is undefined in case of failure. 314b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param destCapacity The size of the buffer (number of bytes). If it is 0, then 315b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * dest may be NULL and the function will only return the length of the result 316b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * without writing any of the result string. 317b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param src The original string. 318b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. 319b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param pErrorCode Must be a valid pointer to an error code value, 320b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * which must not indicate a failure before the function call. 321b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return The length of the result string, if successful - or in case of a buffer overflow, 322b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * in which case it will be greater than destCapacity. 323b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 324b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see u_strToUpper 325b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @stable ICU 3.4 326b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 327b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste QueruU_STABLE int32_t U_EXPORT2 328b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_utf8ToUpper(const UCaseMap *csm, 329b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru char *dest, int32_t destCapacity, 330b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const char *src, int32_t srcLength, 331b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UErrorCode *pErrorCode); 332b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 333b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#if !UCONFIG_NO_BREAK_ITERATION 334b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 335b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 336b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Titlecase a UTF-8 string. 337b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Casing is locale-dependent and context-sensitive. 338b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Titlecasing uses a break iterator to find the first characters of words 339b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * that are to be titlecased. It titlecases those characters and lowercases 340b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * all others. (This can be modified with ucasemap_setOptions().) 341b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 342b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * Note: This function takes a non-const UCaseMap pointer because it will 343b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * open a default break iterator if no break iterator was set yet, 344b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * and effectively call ucasemap_setBreakIterator(); 345b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * also because the break iterator is stateful and will be modified during 346b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * the iteration. 347b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * 348b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The titlecase break iterator can be provided to customize for arbitrary 349b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * styles, using rules and dictionaries beyond the standard iterators. 350b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The standard titlecase iterator for the root locale implements the 351b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * algorithm of Unicode TR 21. 352b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 353b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * This function uses only the setUText(), first(), next() and close() methods of the 354b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * provided break iterator. 355b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 356b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The result may be longer or shorter than the original. 357b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The source string and the destination buffer must not overlap. 358b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 359b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @param csm UCaseMap service object. This pointer is non-const! 360b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * See the note above for details. 361b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param dest A buffer for the result string. The result will be NUL-terminated if 362b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * the buffer is large enough. 363b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The contents is undefined in case of failure. 364b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param destCapacity The size of the buffer (number of bytes). If it is 0, then 365b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * dest may be NULL and the function will only return the length of the result 366b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * without writing any of the result string. 367b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param src The original string. 368b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. 369b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param pErrorCode Must be a valid pointer to an error code value, 370b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * which must not indicate a failure before the function call. 371b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return The length of the result string, if successful - or in case of a buffer overflow, 372b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * in which case it will be greater than destCapacity. 373b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 374b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see u_strToTitle 375b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see U_TITLECASE_NO_LOWERCASE 376b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see U_TITLECASE_NO_BREAK_ADJUSTMENT 377b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @stable ICU 3.8 378b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 37950294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoU_STABLE int32_t U_EXPORT2 380b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_utf8ToTitle(UCaseMap *csm, 381b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru char *dest, int32_t destCapacity, 382b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const char *src, int32_t srcLength, 383b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UErrorCode *pErrorCode); 384b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 385b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#endif 386b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 387b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru/** 38854dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * Case-folds the characters in a UTF-8 string. 38954dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * 390b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * Case-folding is locale-independent and not context-sensitive, 391b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * but there is an option for whether to include or exclude mappings for dotted I 39254dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * and dotless i that are marked with 'T' in CaseFolding.txt. 39354dcd9b6a06071f647dac967e9e267abb9410720Craig Cornelius * 394b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The result may be longer or shorter than the original. 395b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The source string and the destination buffer must not overlap. 396b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 397b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param csm UCaseMap service object. 398b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param dest A buffer for the result string. The result will be NUL-terminated if 399b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * the buffer is large enough. 400b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * The contents is undefined in case of failure. 401b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param destCapacity The size of the buffer (number of bytes). If it is 0, then 402b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * dest may be NULL and the function will only return the length of the result 403b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * without writing any of the result string. 404b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param src The original string. 405b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param srcLength The length of the original string. If -1, then src must be NUL-terminated. 406b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @param pErrorCode Must be a valid pointer to an error code value, 407b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * which must not indicate a failure before the function call. 408b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @return The length of the result string, if successful - or in case of a buffer overflow, 409b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * in which case it will be greater than destCapacity. 410b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * 411b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see u_strFoldCase 412b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see ucasemap_setOptions 413b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see U_FOLD_CASE_DEFAULT 414b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru * @see U_FOLD_CASE_EXCLUDE_SPECIAL_I 415b0ac937921a2c196d8b9da665135bf6ba01a1ccfJean-Baptiste Queru * @stable ICU 3.8 416b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru */ 41750294ead5e5d23f5bbfed76e00e6b510bd41eee1clairehoU_STABLE int32_t U_EXPORT2 418b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queruucasemap_utf8FoldCase(const UCaseMap *csm, 419b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru char *dest, int32_t destCapacity, 420b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru const char *src, int32_t srcLength, 421b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru UErrorCode *pErrorCode); 422b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru 423b13da9df870a61b11249bf741347908dbea0edd8Jean-Baptiste Queru#endif 424