Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/native/common/unicode/stringoptions.h
38827 views
// © 2017 and later: Unicode, Inc. and others.1// License & terms of use: http://www.unicode.org/copyright.html23// stringoptions.h4// created: 2017jun08 Markus W. Scherer56#ifndef __STRINGOPTIONS_H__7#define __STRINGOPTIONS_H__89#include "unicode/utypes.h"1011/**12* \file13* \brief C API: Bit set option bit constants for various string and character processing functions.14*/1516/**17* Option value for case folding: Use default mappings defined in CaseFolding.txt.18*19* @stable ICU 2.020*/21#define U_FOLD_CASE_DEFAULT 02223/**24* Option value for case folding:25*26* Use the modified set of mappings provided in CaseFolding.txt to handle dotted I27* and dotless i appropriately for Turkic languages (tr, az).28*29* Before Unicode 3.2, CaseFolding.txt contains mappings marked with 'I' that30* are to be included for default mappings and31* excluded for the Turkic-specific mappings.32*33* Unicode 3.2 CaseFolding.txt instead contains mappings marked with 'T' that34* are to be excluded for default mappings and35* included for the Turkic-specific mappings.36*37* @stable ICU 2.038*/39#define U_FOLD_CASE_EXCLUDE_SPECIAL_I 14041/**42* Titlecase the string as a whole rather than each word.43* (Titlecase only the character at index 0, possibly adjusted.)44* Option bits value for titlecasing APIs that take an options bit set.45*46* It is an error to specify multiple titlecasing iterator options together,47* including both an options bit and an explicit BreakIterator.48*49* @see U_TITLECASE_ADJUST_TO_CASED50* @stable ICU 6051*/52#define U_TITLECASE_WHOLE_STRING 0x205354/**55* Titlecase sentences rather than words.56* (Titlecase only the first character of each sentence, possibly adjusted.)57* Option bits value for titlecasing APIs that take an options bit set.58*59* It is an error to specify multiple titlecasing iterator options together,60* including both an options bit and an explicit BreakIterator.61*62* @see U_TITLECASE_ADJUST_TO_CASED63* @stable ICU 6064*/65#define U_TITLECASE_SENTENCES 0x406667/**68* Do not lowercase non-initial parts of words when titlecasing.69* Option bit for titlecasing APIs that take an options bit set.70*71* By default, titlecasing will titlecase the character at each72* (possibly adjusted) BreakIterator index and73* lowercase all other characters up to the next iterator index.74* With this option, the other characters will not be modified.75*76* @see U_TITLECASE_ADJUST_TO_CASED77* @see UnicodeString::toTitle78* @see CaseMap::toTitle79* @see ucasemap_setOptions80* @see ucasemap_toTitle81* @see ucasemap_utf8ToTitle82* @stable ICU 3.883*/84#define U_TITLECASE_NO_LOWERCASE 0x1008586/**87* Do not adjust the titlecasing BreakIterator indexes;88* titlecase exactly the characters at breaks from the iterator.89* Option bit for titlecasing APIs that take an options bit set.90*91* By default, titlecasing will take each break iterator index,92* adjust it to the next relevant character (see U_TITLECASE_ADJUST_TO_CASED),93* and titlecase that one.94*95* Other characters are lowercased.96*97* It is an error to specify multiple titlecasing adjustment options together.98*99* @see U_TITLECASE_ADJUST_TO_CASED100* @see U_TITLECASE_NO_LOWERCASE101* @see UnicodeString::toTitle102* @see CaseMap::toTitle103* @see ucasemap_setOptions104* @see ucasemap_toTitle105* @see ucasemap_utf8ToTitle106* @stable ICU 3.8107*/108#define U_TITLECASE_NO_BREAK_ADJUSTMENT 0x200109110/**111* Adjust each titlecasing BreakIterator index to the next cased character.112* (See the Unicode Standard, chapter 3, Default Case Conversion, R3 toTitlecase(X).)113* Option bit for titlecasing APIs that take an options bit set.114*115* This used to be the default index adjustment in ICU.116* Since ICU 60, the default index adjustment is to the next character that is117* a letter, number, symbol, or private use code point.118* (Uncased modifier letters are skipped.)119* The difference in behavior is small for word titlecasing,120* but the new adjustment is much better for whole-string and sentence titlecasing:121* It yields "49ers" and "«丰(abc)»" instead of "49Ers" and "«丰(Abc)»".122*123* It is an error to specify multiple titlecasing adjustment options together.124*125* @see U_TITLECASE_NO_BREAK_ADJUSTMENT126* @stable ICU 60127*/128#define U_TITLECASE_ADJUST_TO_CASED 0x400129130/**131* Option for string transformation functions to not first reset the Edits object.132* Used for example in some case-mapping and normalization functions.133*134* @see CaseMap135* @see Edits136* @see Normalizer2137* @stable ICU 60138*/139#define U_EDITS_NO_RESET 0x2000140141/**142* Omit unchanged text when recording how source substrings143* relate to changed and unchanged result substrings.144* Used for example in some case-mapping and normalization functions.145*146* @see CaseMap147* @see Edits148* @see Normalizer2149* @stable ICU 60150*/151#define U_OMIT_UNCHANGED_TEXT 0x4000152153/**154* Option bit for u_strCaseCompare, u_strcasecmp, unorm_compare, etc:155* Compare strings in code point order instead of code unit order.156* @stable ICU 2.2157*/158#define U_COMPARE_CODE_POINT_ORDER 0x8000159160/**161* Option bit for unorm_compare:162* Perform case-insensitive comparison.163* @stable ICU 2.2164*/165#define U_COMPARE_IGNORE_CASE 0x10000166167/**168* Option bit for unorm_compare:169* Both input strings are assumed to fulfill FCD conditions.170* @stable ICU 2.2171*/172#define UNORM_INPUT_IS_FCD 0x20000173174// Related definitions elsewhere.175// Options that are not meaningful in the same functions176// can share the same bits.177//178// Public:179// unicode/unorm.h #define UNORM_COMPARE_NORM_OPTIONS_SHIFT 20180//181// Internal: (may change or be removed)182// ucase.h #define _STRCASECMP_OPTIONS_MASK 0xffff183// ucase.h #define _FOLD_CASE_OPTIONS_MASK 7184// ucasemap_imp.h #define U_TITLECASE_ITERATOR_MASK 0xe0185// ucasemap_imp.h #define U_TITLECASE_ADJUSTMENT_MASK 0x600186// ustr_imp.h #define _STRNCMP_STYLE 0x1000187// unormcmp.cpp #define _COMPARE_EQUIV 0x80000188189#endif // __STRINGOPTIONS_H__190191192