PrevUpHomeNext

Type collation_flags

boost::text::collation_flags

Synopsis

// In header: <boost/text/collation_fwd.hpp>



enum collation_flags { none = = 0, ignore_accents = = 1 << 0, 
                       ignore_case = = 1 << 1, ignore_punctuation = = 1 << 2, 
                       case_before_accents = = 1 << 3, 
                       upper_case_first = = 1 << 4, 
                       lower_case_first = = 1 << 5, 
                       punctuation_last = = 1 << 6, 
                       accents_reversed = = 1 << 7 };

Description

The flags taken by most functions in the collation search API, plus other functions that compare collated text or created collation keys. These flags are used to indicate desired properties for collation-aware comparisons.

none

Use the default collation settings.

ignore_accents

Use a collation strength (primary) that disregards presence of or differences in accents.

ignore_case

Use a collation strength (secondary or higher) that disregards differences in case.

ignore_punctuation

Use a variable-weighting setting (shifted) that shifts the primary weights of punctuation to be quaternary weights instead, and use a collation strength that disregards quaternary weights (tertiary or higher). It is an error to use this flag along with punctuation_last.

case_before_accents

Consider case before accents, by making a pseudo-level for case weights. The default behavior is to consider accent differences before case differences. This flag only affects collation-aware operations that care about ordering of text. Operations like search that only care about equality of text are unaffected.

upper_case_first

Use a collation strength (tertiary) that considers case, and sort an upper-case code point before the lower-case code point for the same letter. It is an error to use this flag along with lower_case_first or ignore_case. This flag only affects collation-aware operations that care about ordering of text. Operations like search that only care about equality of text are unaffected.

lower_case_first

Use a collation strength (tertiary) that considers case, and sort a lower-case code point before the upper-case code point for the same letter. It is an error to use this flag along with upper_case_first or ignore_case. This flag only affects collation-aware operations that care about ordering of text. Operations like search that only care about equality of text are unaffected.

punctuation_last

Use a variable-weighting setting (shifted) that shifts the primary weights of punctuation to be quaternary weights instead, and use a collation strength (quaternary) that includes those weights. It is an error to use this flag along with ignore_punctuation. This flag only affects collation-aware operations that care about ordering of text. Operations like search that only care about equality of text are unaffected.

accents_reversed

Reverse the order in which the accent (secondary) weights appear. At the time of this writing, this is only done for Canadian French.


PrevUpHomeNext