PostgreSQL Source Code git master
unicode_case_table.h File Reference
Include dependency graph for unicode_case_table.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pg_special_case
 

Macros

#define MAX_CASE_EXPANSION   3
 
#define PG_U_FINAL_SIGMA   (1 << 0)
 

Enumerations

enum  CaseKind {
  CaseLower = 0 , CaseTitle = 1 , CaseUpper = 2 , CaseFold = 3 ,
  NCaseKind
}
 

Functions

static uint16 case_index (char32_t cp)
 

Variables

static const pg_special_case special_case [106]
 
static const char32_t case_map_lower [1704]
 
static const char32_t case_map_title [1704]
 
static const char32_t case_map_upper [1704]
 
static const char32_t case_map_fold [1704]
 
static const uint8 case_map_special [1704]
 
static const uint16 case_map [4778]
 

Macro Definition Documentation

◆ MAX_CASE_EXPANSION

#define MAX_CASE_EXPANSION   3

Definition at line 26 of file unicode_case_table.h.

◆ PG_U_FINAL_SIGMA

#define PG_U_FINAL_SIGMA   (1 << 0)

Definition at line 33 of file unicode_case_table.h.

Enumeration Type Documentation

◆ CaseKind

enum CaseKind
Enumerator
CaseLower 
CaseTitle 
CaseUpper 
CaseFold 
NCaseKind 

Definition at line 35 of file unicode_case_table.h.

36{
37 CaseLower = 0,
38 CaseTitle = 1,
39 CaseUpper = 2,
40 CaseFold = 3,
42} CaseKind;
@ CaseFold
@ CaseTitle
@ NCaseKind
@ CaseLower
@ CaseUpper

Function Documentation

◆ case_index()

static uint16 case_index ( char32_t  cp)
inlinestatic

Definition at line 13524 of file unicode_case_table.h.

13525{
13526 /* Fast path for codepoints < 0x0588 */
13527 if (cp < 0x0588)
13528 {
13529 return case_map[cp];
13530 }
13531
13532 if (cp < 0xABC0)
13533 {
13534 if (cp < 0x2185)
13535 {
13536 if (cp >= 0x10A0 && cp < 0x1100)
13537 {
13538 return case_map[cp - 0x10A0 + 1416];
13539 }
13540 else if (cp >= 0x13A0)
13541 {
13542 if (cp < 0x13FE)
13543 {
13544 return case_map[cp - 0x13A0 + 1512];
13545 }
13546 else if (cp >= 0x1C80)
13547 {
13548 return case_map[cp - 0x1C80 + 1606];
13549 }
13550 }
13551 }
13552 else if (cp >= 0x24B6)
13553 {
13554 if (cp < 0x2D2E)
13555 {
13556 if (cp < 0x24EA)
13557 {
13558 return case_map[cp - 0x24B6 + 2891];
13559 }
13560 else if (cp >= 0x2C00)
13561 {
13562 return case_map[cp - 0x2C00 + 2943];
13563 }
13564 }
13565 else if (cp >= 0xA640)
13566 {
13567 if (cp < 0xA7F7)
13568 {
13569 return case_map[cp - 0xA640 + 3245];
13570 }
13571 else if (cp >= 0xAB53)
13572 {
13573 return case_map[cp - 0xAB53 + 3684];
13574 }
13575 }
13576 }
13577 }
13578 else if (cp >= 0xFB00)
13579 {
13580 if (cp < 0x10D86)
13581 {
13582 if (cp < 0xFF5B)
13583 {
13584 if (cp < 0xFB18)
13585 {
13586 return case_map[cp - 0xFB00 + 3793];
13587 }
13588 else if (cp >= 0xFF21)
13589 {
13590 return case_map[cp - 0xFF21 + 3817];
13591 }
13592 }
13593 else if (cp >= 0x10400)
13594 {
13595 if (cp < 0x105BD)
13596 {
13597 return case_map[cp - 0x10400 + 3875];
13598 }
13599 else if (cp >= 0x10C80)
13600 {
13601 return case_map[cp - 0x10C80 + 4320];
13602 }
13603 }
13604 }
13605 else if (cp >= 0x118A0)
13606 {
13607 if (cp < 0x16E80)
13608 {
13609 if (cp < 0x118E0)
13610 {
13611 return case_map[cp - 0x118A0 + 4582];
13612 }
13613 else if (cp >= 0x16E40)
13614 {
13615 return case_map[cp - 0x16E40 + 4646];
13616 }
13617 }
13618 else if (cp >= 0x1E900)
13619 {
13620 if (cp < 0x1E944)
13621 {
13622 return case_map[cp - 0x1E900 + 4710];
13623 }
13624 }
13625 }
13626 }
13627
13628 return 0;
13629}
static const uint16 case_map[4778]

References case_map.

Referenced by casemap(), and find_case_map().

Variable Documentation

◆ case_map

const uint16 case_map[4778]
static

Definition at line 8734 of file unicode_case_table.h.

Referenced by case_index().

◆ case_map_fold

const char32_t case_map_fold[1704]
static

Definition at line 5307 of file unicode_case_table.h.

Referenced by unicode_casefold_simple().

◆ case_map_lower

const char32_t case_map_lower[1704]
static

Definition at line 168 of file unicode_case_table.h.

Referenced by unicode_lowercase_simple().

◆ case_map_special

const uint8 case_map_special[1704]
static

Definition at line 7020 of file unicode_case_table.h.

Referenced by casemap().

◆ case_map_title

const char32_t case_map_title[1704]
static

Definition at line 1881 of file unicode_case_table.h.

Referenced by unicode_titlecase_simple().

◆ case_map_upper

const char32_t case_map_upper[1704]
static

Definition at line 3594 of file unicode_case_table.h.

Referenced by unicode_uppercase_simple().

◆ special_case

const pg_special_case special_case[106]
static

Definition at line 54 of file unicode_case_table.h.

Referenced by casemap().