stringoptions.h File Reference

C API: Bit set option bit constants for various string and character processing functions. More...

`#include "unicode/utypes.h"`

Go to the source code of this file.

## Macros

#define | U_FOLD_CASE_DEFAULT 0
| Option value for case folding: Use default mappings defined in CaseFolding.txt. More...
#define | U_FOLD_CASE_EXCLUDE_SPECIAL_I 1
| Option value for case folding: More...
#define | U_TITLECASE_WHOLE_STRING 0x20
| Titlecase the string as a whole rather than each word. More...
#define | U_TITLECASE_SENTENCES 0x40
| Titlecase sentences rather than words. More...
#define | U_TITLECASE_NO_LOWERCASE 0x100
| Do not lowercase non-initial parts of words when titlecasing. More...
#define | U_TITLECASE_NO_BREAK_ADJUSTMENT 0x200
| Do not adjust the titlecasing BreakIterator indexes; titlecase exactly the characters at breaks from the iterator. More...
#define | U_TITLECASE_ADJUST_TO_CASED 0x400
| Adjust each titlecasing BreakIterator index to the next cased character. More...
#define | U_EDITS_NO_RESET 0x2000
| Option for string transformation functions to not first reset the Edits object. More...
#define | U_OMIT_UNCHANGED_TEXT 0x4000
| Omit unchanged text when recording how source substrings relate to changed and unchanged result substrings. More...
#define | U_COMPARE_CODE_POINT_ORDER 0x8000
| Option bit for u_strCaseCompare, u_strcasecmp, unorm_compare, etc: Compare strings in code point order instead of code unit order. More...
#define | U_COMPARE_IGNORE_CASE 0x10000
| Option bit for unorm_compare: Perform case-insensitive comparison. More...
#define | UNORM_INPUT_IS_FCD 0x20000
| Option bit for unorm_compare: Both input strings are assumed to fulfill FCD conditions. More...

## Detailed Description

C API: Bit set option bit constants for various string and character processing functions.

Definition in file stringoptions.h.

## Macro Definition Documentation

## U_COMPARE_CODE_POINT_ORDER

#define U_COMPARE_CODE_POINT_ORDER 0x8000

Option bit for u_strCaseCompare, u_strcasecmp, unorm_compare, etc: Compare strings in code point order instead of code unit order.

Stable:
  ICU 2.2

Definition at line 159 of file stringoptions.h.

## U_COMPARE_IGNORE_CASE

#define U_COMPARE_IGNORE_CASE 0x10000

Option bit for unorm_compare: Perform case-insensitive comparison.

Stable:
  ICU 2.2

Definition at line 166 of file stringoptions.h.

## U_EDITS_NO_RESET

#define U_EDITS_NO_RESET 0x2000

Option for string transformation functions to not first reset the Edits object.

Used for example in some case-mapping and normalization functions.

See also
  CaseMap
  Edits
  Normalizer2

Stable:
  ICU 60

Definition at line 140 of file stringoptions.h.

## U_FOLD_CASE_DEFAULT

#define U_FOLD_CASE_DEFAULT 0

Option value for case folding: Use default mappings defined in CaseFolding.txt.

Stable:
  ICU 2.0

Definition at line 22 of file stringoptions.h.

## U_FOLD_CASE_EXCLUDE_SPECIAL_I

#define U_FOLD_CASE_EXCLUDE_SPECIAL_I 1

Option value for case folding:

Use the modified set of mappings provided in CaseFolding.txt to handle dotted I and dotless i appropriately for Turkic languages (tr, az).

Before Unicode 3.2, CaseFolding.txt contains mappings marked with 'I' that are to be included for default mappings and excluded for the Turkic-specific mappings.

Unicode 3.2 CaseFolding.txt instead contains mappings marked with 'T' that are to be excluded for default mappings and included for the Turkic-specific mappings.

Stable:
  ICU 2.0

Definition at line 40 of file stringoptions.h.

## U_OMIT_UNCHANGED_TEXT

#define U_OMIT_UNCHANGED_TEXT 0x4000

Omit unchanged text when recording how source substrings relate to changed and unchanged result substrings.

Used for example in some case-mapping and normalization functions.

See also
  CaseMap
  Edits
  Normalizer2

Stable:
  ICU 60

Definition at line 152 of file stringoptions.h.

## U_TITLECASE_ADJUST_TO_CASED

#define U_TITLECASE_ADJUST_TO_CASED 0x400

Adjust each titlecasing BreakIterator index to the next cased character.

(See the Unicode Standard, chapter 3, Default Case Conversion, R3 toTitlecase(X).) Option bit for titlecasing APIs that take an options bit set.

This used to be the default index adjustment in ICU. Since ICU 60, the default index adjustment is to the next character that is a letter, number, symbol, or private use code point. (Uncased modifier letters are skipped.) The difference in behavior is small for word titlecasing, but the new adjustment is much better for whole-string and sentence titlecasing: It yields "49ers" and "«丰(abc)»" instead of "49Ers" and "«丰(Abc)»".

It is an error to specify multiple titlecasing adjustment options together.

See also
  U_TITLECASE_NO_BREAK_ADJUSTMENT

Stable:
  ICU 60

Definition at line 129 of file stringoptions.h.

## U_TITLECASE_NO_BREAK_ADJUSTMENT

#define U_TITLECASE_NO_BREAK_ADJUSTMENT 0x200

Do not adjust the titlecasing BreakIterator indexes; titlecase exactly the characters at breaks from the iterator.

Option bit for titlecasing APIs that take an options bit set.

By default, titlecasing will take each break iterator index, adjust it to the next relevant character (see U_TITLECASE_ADJUST_TO_CASED), and titlecase that one.

Other characters are lowercased.

It is an error to specify multiple titlecasing adjustment options together.

See also
  U_TITLECASE_ADJUST_TO_CASED
  U_TITLECASE_NO_LOWERCASE
  UnicodeString::toTitle
  CaseMap::toTitle
  ucasemap_setOptions
  ucasemap_toTitle
  ucasemap_utf8ToTitle

Stable:
  ICU 3.8

Definition at line 109 of file stringoptions.h.

## U_TITLECASE_NO_LOWERCASE

#define U_TITLECASE_NO_LOWERCASE 0x100

Do not lowercase non-initial parts of words when titlecasing.

Option bit for titlecasing APIs that take an options bit set.

By default, titlecasing will titlecase the character at each (possibly adjusted) BreakIterator index and lowercase all other characters up to the next iterator index. With this option, the other characters will not be modified.

See also
  U_TITLECASE_ADJUST_TO_CASED
  UnicodeString::toTitle
  CaseMap::toTitle
  ucasemap_setOptions
  ucasemap_toTitle
  ucasemap_utf8ToTitle

Stable:
  ICU 3.8

Definition at line 85 of file stringoptions.h.

## U_TITLECASE_SENTENCES

#define U_TITLECASE_SENTENCES 0x40

Titlecase sentences rather than words.

(Titlecase only the first character of each sentence, possibly adjusted.) Option bits value for titlecasing APIs that take an options bit set.

It is an error to specify multiple titlecasing iterator options together, including both an options bit and an explicit BreakIterator.

See also
  U_TITLECASE_ADJUST_TO_CASED

Stable:
  ICU 60

Definition at line 66 of file stringoptions.h.

## U_TITLECASE_WHOLE_STRING

#define U_TITLECASE_WHOLE_STRING 0x20

Titlecase the string as a whole rather than each word.

(Titlecase only the character at index 0, possibly adjusted.) Option bits value for titlecasing APIs that take an options bit set.

It is an error to specify multiple titlecasing iterator options together, including both an options bit and an explicit BreakIterator.

See also
  U_TITLECASE_ADJUST_TO_CASED

Stable:
  ICU 60

Definition at line 53 of file stringoptions.h.

## UNORM_INPUT_IS_FCD

#define UNORM_INPUT_IS_FCD 0x20000

Option bit for unorm_compare: Both input strings are assumed to fulfill FCD conditions.

Stable:
  ICU 2.2

Definition at line 173 of file stringoptions.h.