PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
unicode_case.h File Reference
#include "mb/pg_wchar.h"
Include dependency graph for unicode_case.h:
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

pg_wchar unicode_lowercase_simple (pg_wchar code)
 
pg_wchar unicode_titlecase_simple (pg_wchar code)
 
pg_wchar unicode_uppercase_simple (pg_wchar code)
 
pg_wchar unicode_casefold_simple (pg_wchar 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 19 of file unicode_case.h.

Function Documentation

◆ unicode_casefold_simple()

pg_wchar unicode_casefold_simple ( pg_wchar  code)

Definition at line 74 of file unicode_case.c.

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

References case_map_fold, and find_case_map().

◆ unicode_lowercase_simple()

pg_wchar unicode_lowercase_simple ( pg_wchar  code)

Definition at line 50 of file unicode_case.c.

51{
53
54 return cp != 0 ? cp : code;
55}
static const pg_wchar case_map_lower[1704]

References case_map_lower, and find_case_map().

Referenced by pg_wc_tolower().

◆ 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()

pg_wchar unicode_titlecase_simple ( pg_wchar  code)

Definition at line 58 of file unicode_case.c.

59{
61
62 return cp != 0 ? cp : code;
63}
static const pg_wchar case_map_title[1704]

References case_map_title, and find_case_map().

◆ unicode_uppercase_simple()

pg_wchar unicode_uppercase_simple ( pg_wchar  code)

Definition at line 66 of file unicode_case.c.

67{
69
70 return cp != 0 ? cp : code;
71}
static const pg_wchar case_map_upper[1704]

References case_map_upper, and find_case_map().

Referenced by pg_wc_toupper().