47 char32_t *simple,
const char32_t **special);
54 return cp != 0 ?
cp : code;
62 return cp != 0 ?
cp : code;
70 return cp != 0 ?
cp : code;
78 return cp != 0 ?
cp : code;
237 const char32_t *special =
NULL;
268 char32_t u2 = simple;
283 char32_t u2 = special[
i];
319 for (
int i = offset - 1;
i >= 0;
i--)
321 if ((
str[
i] & 0x80) == 0 || (
str[
i] & 0xC0) == 0xC0)
332 else if ((
str[
i] & 0xC0) == 0x80)
343 for (
int i = offset + 1;
i <
len &&
str[
i] !=
'\0';
i++)
345 if ((
str[
i] & 0x80) == 0 || (
str[
i] & 0xC0) == 0xC0)
356 else if ((
str[
i] & 0xC0) == 0x80)
399 char32_t *simple,
const char32_t **special)
Datum idx(PG_FUNCTION_ARGS)
#define Assert(condition)
static char32_t utf8_to_unicode(const unsigned char *c)
static unsigned char * unicode_to_utf8(char32_t c, unsigned char *utf8string)
static int unicode_utf8len(char32_t c)
char32_t map[NCaseKind][MAX_CASE_EXPANSION]
char32_t unicode_titlecase_simple(char32_t code)
size_t unicode_strupper(char *dst, size_t dstsize, const char *src, ssize_t srclen, bool full)
size_t unicode_strlower(char *dst, size_t dstsize, const char *src, ssize_t srclen, bool full)
char32_t unicode_casefold_simple(char32_t code)
char32_t unicode_lowercase_simple(char32_t code)
static char32_t find_case_map(char32_t ucs, const char32_t *map)
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)
size_t unicode_strtitle(char *dst, size_t dstsize, const char *src, ssize_t srclen, bool full, WordBoundaryNext wbnext, void *wbstate)
static const char32_t *const casekind_map[NCaseKind]
static bool check_special_conditions(int conditions, const char *str, size_t len, size_t offset)
size_t unicode_strfold(char *dst, size_t dstsize, const char *src, ssize_t srclen, bool full)
static enum CaseMapResult casemap(char32_t u1, CaseKind casekind, bool full, const char *src, size_t srclen, size_t srcoff, char32_t *simple, const char32_t **special)
static bool check_final_sigma(const unsigned char *str, size_t len, size_t offset)
char32_t unicode_uppercase_simple(char32_t code)
size_t(* WordBoundaryNext)(void *wbstate)
static const uint8 case_map_special[1704]
#define MAX_CASE_EXPANSION
static const char32_t case_map_lower[1704]
static const char32_t case_map_title[1704]
static const pg_special_case special_case[106]
static const char32_t case_map_fold[1704]
static uint16 case_index(char32_t cp)
static const char32_t case_map_upper[1704]
bool pg_u_prop_cased(char32_t code)
bool pg_u_prop_case_ignorable(char32_t code)