PostgreSQL Source Code  git master
unicode_case.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * unicode_case.h
4  * Routines for converting character case.
5  *
6  * These definitions can be used by both frontend and backend code.
7  *
8  * Copyright (c) 2017-2024, PostgreSQL Global Development Group
9  *
10  * src/include/common/unicode_case.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef UNICODE_CASE_H
15 #define UNICODE_CASE_H
16 
17 #include "mb/pg_wchar.h"
18 
19 typedef size_t (*WordBoundaryNext) (void *wbstate);
20 
24 size_t unicode_strlower(char *dst, size_t dstsize, const char *src,
25  ssize_t srclen);
26 size_t unicode_strtitle(char *dst, size_t dstsize, const char *src,
27  ssize_t srclen, WordBoundaryNext wbnext,
28  void *wbstate);
29 size_t unicode_strupper(char *dst, size_t dstsize, const char *src,
30  ssize_t srclen);
31 
32 #endif /* UNICODE_CASE_H */
unsigned int pg_wchar
Definition: mbprint.c:31
pg_wchar unicode_uppercase_simple(pg_wchar ucs)
Definition: unicode_case.c:45
size_t unicode_strlower(char *dst, size_t dstsize, const char *src, ssize_t srclen)
Definition: unicode_case.c:69
size_t unicode_strupper(char *dst, size_t dstsize, const char *src, ssize_t srclen)
Definition: unicode_case.c:124
size_t(* WordBoundaryNext)(void *wbstate)
Definition: unicode_case.h:19
pg_wchar unicode_lowercase_simple(pg_wchar ucs)
Definition: unicode_case.c:29
pg_wchar unicode_titlecase_simple(pg_wchar ucs)
Definition: unicode_case.c:37
size_t unicode_strtitle(char *dst, size_t dstsize, const char *src, ssize_t srclen, WordBoundaryNext wbnext, void *wbstate)
Definition: unicode_case.c:100