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

Go to the source code of this file.

Typedefs

typedef size_t(* WordBoundaryNext) (void *wbstate)
 

Functions

char32_t unicode_lowercase_simple (char32_t code)
 
char32_t unicode_titlecase_simple (char32_t code)
 
char32_t unicode_uppercase_simple (char32_t code)
 
char32_t unicode_casefold_simple (char32_t code)
 
size_t unicode_strlower (char *dst, size_t dstsize, const char *src, ssize_t srclen, bool full)
 
size_t unicode_strtitle (char *dst, size_t dstsize, const char *src, ssize_t srclen, bool full, WordBoundaryNext wbnext, void *wbstate)
 
size_t unicode_strupper (char *dst, size_t dstsize, const char *src, ssize_t srclen, bool full)
 
size_t unicode_strfold (char *dst, size_t dstsize, const char *src, ssize_t srclen, bool full)
 

Typedef Documentation

◆ WordBoundaryNext

typedef size_t(* WordBoundaryNext) (void *wbstate)

Definition at line 17 of file unicode_case.h.

Function Documentation

◆ unicode_casefold_simple()

char32_t unicode_casefold_simple ( char32_t  code)

Definition at line 74 of file unicode_case.c.

75{
76 char32_t cp = find_case_map(code, case_map_fold);
77
78 return cp != 0 ? cp : code;
79}
static char32_t find_case_map(char32_t ucs, const char32_t *map)
Definition: unicode_case.c:438
static const char32_t case_map_fold[1704]

References case_map_fold, and find_case_map().

◆ unicode_lowercase_simple()

char32_t unicode_lowercase_simple ( char32_t  code)

Definition at line 50 of file unicode_case.c.

51{
52 char32_t cp = find_case_map(code, case_map_lower);
53
54 return cp != 0 ? cp : code;
55}
static const char32_t case_map_lower[1704]

References case_map_lower, and find_case_map().

Referenced by wc_tolower_builtin().

◆ unicode_strfold()

size_t unicode_strfold ( char *  dst,
size_t  dstsize,
const char *  src,
ssize_t  srclen,
bool  full 
)

Definition at line 189 of file unicode_case.c.

191{
192 return convert_case(dst, dstsize, src, srclen, CaseFold, full, NULL,
193 NULL);
194}
static size_t convert_case(char *dst, size_t dstsize, const char *src, ssize_t srclen, CaseKind str_casekind, bool full, WordBoundaryNext wbnext, void *wbstate)
Definition: unicode_case.c:213
@ CaseFold

References CaseFold, and convert_case().

Referenced by strfold_builtin(), and tfunc_fold().

◆ unicode_strlower()

size_t unicode_strlower ( char *  dst,
size_t  dstsize,
const char *  src,
ssize_t  srclen,
bool  full 
)

Definition at line 101 of file unicode_case.c.

103{
104 return convert_case(dst, dstsize, src, srclen, CaseLower, full, NULL,
105 NULL);
106}
@ CaseLower

References CaseLower, and convert_case().

Referenced by strlower_builtin(), and tfunc_lower().

◆ unicode_strtitle()

size_t unicode_strtitle ( char *  dst,
size_t  dstsize,
const char *  src,
ssize_t  srclen,
bool  full,
WordBoundaryNext  wbnext,
void *  wbstate 
)

Definition at line 138 of file unicode_case.c.

140{
141 return convert_case(dst, dstsize, src, srclen, CaseTitle, full, wbnext,
142 wbstate);
143}
@ CaseTitle

References CaseTitle, and convert_case().

Referenced by strtitle_builtin(), and tfunc_title().

◆ unicode_strupper()

size_t unicode_strupper ( char *  dst,
size_t  dstsize,
const char *  src,
ssize_t  srclen,
bool  full 
)

Definition at line 165 of file unicode_case.c.

167{
168 return convert_case(dst, dstsize, src, srclen, CaseUpper, full, NULL,
169 NULL);
170}
@ CaseUpper

References CaseUpper, and convert_case().

Referenced by strupper_builtin(), and tfunc_upper().

◆ unicode_titlecase_simple()

char32_t unicode_titlecase_simple ( char32_t  code)

Definition at line 58 of file unicode_case.c.

59{
60 char32_t cp = find_case_map(code, case_map_title);
61
62 return cp != 0 ? cp : code;
63}
static const char32_t case_map_title[1704]

References case_map_title, and find_case_map().

◆ unicode_uppercase_simple()

char32_t unicode_uppercase_simple ( char32_t  code)

Definition at line 66 of file unicode_case.c.

67{
68 char32_t cp = find_case_map(code, case_map_upper);
69
70 return cp != 0 ? cp : code;
71}
static const char32_t case_map_upper[1704]

References case_map_upper, and find_case_map().

Referenced by wc_toupper_builtin().