|
xapian-core
2.1.0
|
Enumerations | |
| enum | { INFO_TOLOWER_MASK = 0x40 , INFO_TOUPPER_MASK = 0x80 } |
Functions | |
| int | get_character_info (unsigned ch) noexcept |
| Get information about a Unicode codepoint. More... | |
| category | get_category (int info) |
| int | get_delta (int info) |
|
private |
Bit-masks for case conversion.
If the respective bit is set in the return value of get_character_info() then the delta value also contained in that return values needs adding/subtracting to convert to lower/upper case.
| Enumerator | |
|---|---|
| INFO_TOLOWER_MASK | |
| INFO_TOUPPER_MASK | |
|
inlineprivate |
Extract the category of a Unicode character from its info.
Definition at line 283 of file unicode.h.
Referenced by DEFINE_TESTCASE(), Xapian::Unicode::get_category(), is_digit(), Xapian::is_digit(), Xapian::should_stem(), should_stem(), Xapian::MSet::Internal::snippet(), Xapian::snippet_check_leading_nonwordchar(), Xapian::snippet_check_trailing_nonwordchar(), and test_codepoint().
|
privatenoexcept |
Get information about a Unicode codepoint.
Extract the information about a character from the Unicode character tables.
Characters outside of the Unicode range (i.e. ch >= 0x110000) are treated as UNASSIGNED with no case variants.
The bottom 5 bits of the returned value are the category code.
The top 24 bits give a signed delta to apply for case changes.
If bit INFO_LOWER_MASK set, add delta to convert to lower case.
If bit INFO_UPPER_MASK set, subtract delta to convert to upper case.
Definition at line 5697 of file unicode-data.cc.
References char_info, p, page, page_map, PAGE_SIZE_BITS, rare, and Xapian::Unicode::UNASSIGNED.
Referenced by Xapian::Unicode::get_category(), Xapian::Unicode::tolower(), and Xapian::Unicode::toupper().
|
inlineprivate |
Extract the delta to use for case conversion of a character from its info.
Definition at line 290 of file unicode.h.
Referenced by Xapian::Unicode::tolower(), and Xapian::Unicode::toupper().