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)
 
size_t unicode_strlower (char *dst, size_t dstsize, const char *src, ssize_t srclen)
 
size_t unicode_strtitle (char *dst, size_t dstsize, const char *src, ssize_t srclen, WordBoundaryNext wbnext, void *wbstate)
 
size_t unicode_strupper (char *dst, size_t dstsize, const char *src, ssize_t srclen)
 

Typedef Documentation

◆ WordBoundaryNext

typedef size_t(* WordBoundaryNext) (void *wbstate)

Definition at line 19 of file unicode_case.h.

Function Documentation

◆ unicode_lowercase_simple()

pg_wchar unicode_lowercase_simple ( pg_wchar  code)

Definition at line 28 of file unicode_case.c.

29 {
30  const pg_case_map *map = find_case_map(code);
31 
32  return map ? map->simplemap[CaseLower] : code;
33 }
pg_wchar simplemap[NCaseKind]
static const pg_case_map * find_case_map(pg_wchar ucs)
Definition: unicode_case.c:202
@ CaseLower

References CaseLower, find_case_map(), and pg_case_map::simplemap.

Referenced by pg_wc_tolower().

◆ unicode_strlower()

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

Definition at line 68 of file unicode_case.c.

69 {
70  return convert_case(dst, dstsize, src, srclen, CaseLower, NULL, NULL);
71 }
static size_t convert_case(char *dst, size_t dstsize, const char *src, ssize_t srclen, CaseKind str_casekind, WordBoundaryNext wbnext, void *wbstate)
Definition: unicode_case.c:136

References CaseLower, and convert_case().

Referenced by str_tolower(), and test_strlower().

◆ unicode_strtitle()

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

Definition at line 99 of file unicode_case.c.

101 {
102  return convert_case(dst, dstsize, src, srclen, CaseTitle, wbnext,
103  wbstate);
104 }
@ CaseTitle

References CaseTitle, and convert_case().

Referenced by str_initcap().

◆ unicode_strupper()

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

Definition at line 123 of file unicode_case.c.

124 {
125  return convert_case(dst, dstsize, src, srclen, CaseUpper, NULL, NULL);
126 }
@ CaseUpper

References CaseUpper, and convert_case().

Referenced by str_toupper().

◆ unicode_titlecase_simple()

pg_wchar unicode_titlecase_simple ( pg_wchar  code)

Definition at line 36 of file unicode_case.c.

37 {
38  const pg_case_map *map = find_case_map(code);
39 
40  return map ? map->simplemap[CaseTitle] : code;
41 }

References CaseTitle, find_case_map(), and pg_case_map::simplemap.

◆ unicode_uppercase_simple()

pg_wchar unicode_uppercase_simple ( pg_wchar  code)

Definition at line 44 of file unicode_case.c.

45 {
46  const pg_case_map *map = find_case_map(code);
47 
48  return map ? map->simplemap[CaseUpper] : code;
49 }

References CaseUpper, find_case_map(), and pg_case_map::simplemap.

Referenced by pg_wc_toupper().