php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_unicode.h File Reference

Go to the source code of this file.

Macros

#define UC_MN   0 /* Mark, Non-Spacing */
 
#define UC_MC   1 /* Mark, Spacing Combining */
 
#define UC_ME   2 /* Mark, Enclosing */
 
#define UC_ND   3 /* Number, Decimal Digit */
 
#define UC_NL   4 /* Number, Letter */
 
#define UC_NO   5 /* Number, Other */
 
#define UC_ZS   6 /* Separator, Space */
 
#define UC_ZL   7 /* Separator, Line */
 
#define UC_ZP   8 /* Separator, Paragraph */
 
#define UC_OS   9 /* Other, Surrogate */
 
#define UC_CO   10 /* Other, Private Use */
 
#define UC_CN   11 /* Other, Not Assigned */
 
#define UC_LU   12 /* Letter, Uppercase */
 
#define UC_LL   13 /* Letter, Lowercase */
 
#define UC_LT   14 /* Letter, Titlecase */
 
#define UC_LM   15 /* Letter, Modifier */
 
#define UC_LO   16 /* Letter, Other */
 
#define UC_SM   17 /* Symbol, Math */
 
#define UC_SC   18 /* Symbol, Currency */
 
#define UC_SK   19 /* Symbol, Modifier */
 
#define UC_SO   20 /* Symbol, Other */
 
#define UC_L   21 /* Left-To-Right */
 
#define UC_R   22 /* Right-To-Left */
 
#define UC_EN   23 /* European Number */
 
#define UC_ES   24 /* European Number Separator */
 
#define UC_ET   25 /* European Number Terminator */
 
#define UC_AN   26 /* Arabic Number */
 
#define UC_CS   27 /* Common Number Separator */
 
#define UC_B   28 /* Block Separator */
 
#define UC_S   29 /* Segment Separator */
 
#define UC_WS   30 /* Whitespace */
 
#define UC_ON   31 /* Other Neutrals */
 
#define UC_AL   32 /* Arabic Letter */
 
#define UC_C   33 /* Control */
 
#define UC_P   34 /* Punctuation */
 
#define UC_CASED   35
 
#define UC_CASE_IGNORABLE   36
 
#define php_unicode_is_alpha(cc)
 
#define php_unicode_is_digit(cc)
 
#define php_unicode_is_alnum(cc)
 
#define php_unicode_is_cntrl(cc)
 
#define php_unicode_is_blank(cc)
 
#define php_unicode_is_punct(cc)
 
#define php_unicode_is_graph(cc)
 
#define php_unicode_is_print(cc)
 
#define php_unicode_is_title(cc)
 
#define php_unicode_is_symbol(cc)
 
#define php_unicode_is_number(cc)
 
#define php_unicode_is_nonspacing(cc)
 
#define php_unicode_is_rtl(cc)
 
#define php_unicode_is_ltr(cc)
 
#define php_unicode_is_strong(cc)
 
#define php_unicode_is_weak(cc)
 
#define php_unicode_is_neutral(cc)
 
#define php_unicode_is_separator(cc)
 
#define php_unicode_is_mark(cc)
 
#define php_unicode_is_modif(cc)
 
#define php_unicode_is_letnum(cc)
 
#define php_unicode_is_math(cc)
 
#define php_unicode_is_currency(cc)
 
#define php_unicode_is_modifsymbol(cc)
 
#define php_unicode_is_nsmark(cc)
 
#define php_unicode_is_spmark(cc)
 
#define php_unicode_is_enclosing(cc)
 
#define php_unicode_is_private(cc)
 
#define php_unicode_is_surrogate(cc)
 
#define php_unicode_is_lsep(cc)
 
#define php_unicode_is_psep(cc)
 
#define php_unicode_is_han(cc)
 
#define php_unicode_is_hangul(cc)
 
#define php_unicode_is_cased(cc)
 
#define php_unicode_is_case_ignorable(cc)
 

Enumerations

enum  php_case_mode {
  PHP_UNICODE_CASE_UPPER = 0 , PHP_UNICODE_CASE_LOWER , PHP_UNICODE_CASE_TITLE , PHP_UNICODE_CASE_FOLD ,
  PHP_UNICODE_CASE_UPPER_SIMPLE , PHP_UNICODE_CASE_LOWER_SIMPLE , PHP_UNICODE_CASE_TITLE_SIMPLE , PHP_UNICODE_CASE_FOLD_SIMPLE ,
  PHP_UNICODE_CASE_MODE_MAX
}
 

Functions

MBSTRING_API bool php_unicode_is_prop (unsigned long code,...)
 
MBSTRING_API bool php_unicode_is_prop1 (unsigned long code, int prop)
 
MBSTRING_API zend_stringphp_unicode_convert_case (php_case_mode case_mode, const char *srcstr, size_t srclen, const mbfl_encoding *src_encoding, const mbfl_encoding *dst_encoding, int illegal_mode, uint32_t illegal_substchar)
 

Macro Definition Documentation

◆ php_unicode_is_alnum

#define php_unicode_is_alnum ( cc)
Value:
MBSTRING_API bool php_unicode_is_prop(unsigned long code,...)
Definition php_unicode.c:69
#define UC_LU
Definition php_unicode.h:46
#define UC_LT
Definition php_unicode.h:48
#define UC_LL
Definition php_unicode.h:47
#define UC_LO
Definition php_unicode.h:50
#define UC_ND
Definition php_unicode.h:37
#define UC_LM
Definition php_unicode.h:49

Definition at line 116 of file php_unicode.h.

◆ php_unicode_is_alpha

#define php_unicode_is_alpha ( cc)
Value:

Definition at line 114 of file php_unicode.h.

◆ php_unicode_is_blank

#define php_unicode_is_blank ( cc)
Value:
MBSTRING_API bool php_unicode_is_prop1(unsigned long code, int prop)
Definition php_unicode.c:64
#define UC_ZS
Definition php_unicode.h:40

Definition at line 118 of file php_unicode.h.

◆ php_unicode_is_case_ignorable

#define php_unicode_is_case_ignorable ( cc)
Value:

Definition at line 173 of file php_unicode.h.

◆ php_unicode_is_cased

#define php_unicode_is_cased ( cc)
Value:
#define UC_CASED
Definition php_unicode.h:73

Definition at line 172 of file php_unicode.h.

◆ php_unicode_is_cntrl

#define php_unicode_is_cntrl ( cc)
Value:
#define UC_C
Definition php_unicode.h:69

Definition at line 117 of file php_unicode.h.

◆ php_unicode_is_currency

#define php_unicode_is_currency ( cc)
Value:
#define UC_SC
Definition php_unicode.h:52

Definition at line 151 of file php_unicode.h.

◆ php_unicode_is_digit

#define php_unicode_is_digit ( cc)
Value:

Definition at line 115 of file php_unicode.h.

◆ php_unicode_is_enclosing

#define php_unicode_is_enclosing ( cc)
Value:
#define UC_ME
Definition php_unicode.h:36

Definition at line 155 of file php_unicode.h.

◆ php_unicode_is_graph

#define php_unicode_is_graph ( cc)
Value:
#define UC_SK
Definition php_unicode.h:53
#define UC_NO
Definition php_unicode.h:39
#define UC_NL
Definition php_unicode.h:38
#define UC_MC
Definition php_unicode.h:35
#define UC_MN
Definition php_unicode.h:34
#define UC_SM
Definition php_unicode.h:51
#define UC_SO
Definition php_unicode.h:54
#define UC_P
Definition php_unicode.h:70

Definition at line 120 of file php_unicode.h.

◆ php_unicode_is_han

#define php_unicode_is_han ( cc)
Value:
(((cc) >= 0x4e00 && (cc) <= 0x9fff) ||\
((cc) >= 0xf900 && (cc) <= 0xfaff))

Definition at line 164 of file php_unicode.h.

◆ php_unicode_is_hangul

#define php_unicode_is_hangul ( cc)
Value:
((cc) >= 0xac00 && (cc) <= 0xd7ff)

Definition at line 166 of file php_unicode.h.

◆ php_unicode_is_letnum

#define php_unicode_is_letnum ( cc)
Value:

Definition at line 149 of file php_unicode.h.

◆ php_unicode_is_lsep

#define php_unicode_is_lsep ( cc)
Value:
#define UC_ZL
Definition php_unicode.h:41

Definition at line 158 of file php_unicode.h.

◆ php_unicode_is_ltr

#define php_unicode_is_ltr ( cc)
Value:
#define UC_L
Definition php_unicode.h:55

Definition at line 138 of file php_unicode.h.

◆ php_unicode_is_mark

#define php_unicode_is_mark ( cc)
Value:

Definition at line 147 of file php_unicode.h.

◆ php_unicode_is_math

#define php_unicode_is_math ( cc)
Value:

Definition at line 150 of file php_unicode.h.

◆ php_unicode_is_modif

#define php_unicode_is_modif ( cc)
Value:

Definition at line 148 of file php_unicode.h.

◆ php_unicode_is_modifsymbol

#define php_unicode_is_modifsymbol ( cc)
Value:

Definition at line 152 of file php_unicode.h.

◆ php_unicode_is_neutral

#define php_unicode_is_neutral ( cc)
Value:
#define UC_S
Definition php_unicode.h:63
#define UC_B
Definition php_unicode.h:62
#define UC_WS
Definition php_unicode.h:64
#define UC_ON
Definition php_unicode.h:65

Definition at line 141 of file php_unicode.h.

◆ php_unicode_is_nonspacing

#define php_unicode_is_nonspacing ( cc)
Value:

Definition at line 132 of file php_unicode.h.

◆ php_unicode_is_nsmark

#define php_unicode_is_nsmark ( cc)
Value:

Definition at line 153 of file php_unicode.h.

◆ php_unicode_is_number

#define php_unicode_is_number ( cc)
Value:

Definition at line 131 of file php_unicode.h.

◆ php_unicode_is_print

#define php_unicode_is_print ( cc)
Value:

Definition at line 124 of file php_unicode.h.

◆ php_unicode_is_private

#define php_unicode_is_private ( cc)
Value:
#define UC_CO
Definition php_unicode.h:44

Definition at line 156 of file php_unicode.h.

◆ php_unicode_is_psep

#define php_unicode_is_psep ( cc)
Value:
#define UC_ZP
Definition php_unicode.h:42

Definition at line 159 of file php_unicode.h.

◆ php_unicode_is_punct

#define php_unicode_is_punct ( cc)
Value:

Definition at line 119 of file php_unicode.h.

◆ php_unicode_is_rtl

#define php_unicode_is_rtl ( cc)
Value:
#define UC_R
Definition php_unicode.h:56

Definition at line 137 of file php_unicode.h.

◆ php_unicode_is_separator

#define php_unicode_is_separator ( cc)
Value:

Definition at line 142 of file php_unicode.h.

◆ php_unicode_is_spmark

#define php_unicode_is_spmark ( cc)
Value:

Definition at line 154 of file php_unicode.h.

◆ php_unicode_is_strong

#define php_unicode_is_strong ( cc)
Value:

Definition at line 139 of file php_unicode.h.

◆ php_unicode_is_surrogate

#define php_unicode_is_surrogate ( cc)
Value:
#define UC_OS
Definition php_unicode.h:43

Definition at line 157 of file php_unicode.h.

◆ php_unicode_is_symbol

#define php_unicode_is_symbol ( cc)
Value:

Definition at line 130 of file php_unicode.h.

◆ php_unicode_is_title

#define php_unicode_is_title ( cc)
Value:

Definition at line 128 of file php_unicode.h.

◆ php_unicode_is_weak

#define php_unicode_is_weak ( cc)
Value:
#define UC_EN
Definition php_unicode.h:57
#define UC_AN
Definition php_unicode.h:60
#define UC_ES
Definition php_unicode.h:58
#define UC_CS
Definition php_unicode.h:61
#define UC_ET
Definition php_unicode.h:59

Definition at line 140 of file php_unicode.h.

◆ UC_AL

#define UC_AL   32 /* Arabic Letter */

Definition at line 66 of file php_unicode.h.

◆ UC_AN

#define UC_AN   26 /* Arabic Number */

Definition at line 60 of file php_unicode.h.

◆ UC_B

#define UC_B   28 /* Block Separator */

Definition at line 62 of file php_unicode.h.

◆ UC_C

#define UC_C   33 /* Control */

Definition at line 69 of file php_unicode.h.

◆ UC_CASE_IGNORABLE

#define UC_CASE_IGNORABLE   36

Definition at line 74 of file php_unicode.h.

◆ UC_CASED

#define UC_CASED   35

Definition at line 73 of file php_unicode.h.

◆ UC_CN

#define UC_CN   11 /* Other, Not Assigned */

Definition at line 45 of file php_unicode.h.

◆ UC_CO

#define UC_CO   10 /* Other, Private Use */

Definition at line 44 of file php_unicode.h.

◆ UC_CS

#define UC_CS   27 /* Common Number Separator */

Definition at line 61 of file php_unicode.h.

◆ UC_EN

#define UC_EN   23 /* European Number */

Definition at line 57 of file php_unicode.h.

◆ UC_ES

#define UC_ES   24 /* European Number Separator */

Definition at line 58 of file php_unicode.h.

◆ UC_ET

#define UC_ET   25 /* European Number Terminator */

Definition at line 59 of file php_unicode.h.

◆ UC_L

#define UC_L   21 /* Left-To-Right */

Definition at line 55 of file php_unicode.h.

◆ UC_LL

#define UC_LL   13 /* Letter, Lowercase */

Definition at line 47 of file php_unicode.h.

◆ UC_LM

#define UC_LM   15 /* Letter, Modifier */

Definition at line 49 of file php_unicode.h.

◆ UC_LO

#define UC_LO   16 /* Letter, Other */

Definition at line 50 of file php_unicode.h.

◆ UC_LT

#define UC_LT   14 /* Letter, Titlecase */

Definition at line 48 of file php_unicode.h.

◆ UC_LU

#define UC_LU   12 /* Letter, Uppercase */

Definition at line 46 of file php_unicode.h.

◆ UC_MC

#define UC_MC   1 /* Mark, Spacing Combining */

Definition at line 35 of file php_unicode.h.

◆ UC_ME

#define UC_ME   2 /* Mark, Enclosing */

Definition at line 36 of file php_unicode.h.

◆ UC_MN

#define UC_MN   0 /* Mark, Non-Spacing */

Definition at line 34 of file php_unicode.h.

◆ UC_ND

#define UC_ND   3 /* Number, Decimal Digit */

Definition at line 37 of file php_unicode.h.

◆ UC_NL

#define UC_NL   4 /* Number, Letter */

Definition at line 38 of file php_unicode.h.

◆ UC_NO

#define UC_NO   5 /* Number, Other */

Definition at line 39 of file php_unicode.h.

◆ UC_ON

#define UC_ON   31 /* Other Neutrals */

Definition at line 65 of file php_unicode.h.

◆ UC_OS

#define UC_OS   9 /* Other, Surrogate */

Definition at line 43 of file php_unicode.h.

◆ UC_P

#define UC_P   34 /* Punctuation */

Definition at line 70 of file php_unicode.h.

◆ UC_R

#define UC_R   22 /* Right-To-Left */

Definition at line 56 of file php_unicode.h.

◆ UC_S

#define UC_S   29 /* Segment Separator */

Definition at line 63 of file php_unicode.h.

◆ UC_SC

#define UC_SC   18 /* Symbol, Currency */

Definition at line 52 of file php_unicode.h.

◆ UC_SK

#define UC_SK   19 /* Symbol, Modifier */

Definition at line 53 of file php_unicode.h.

◆ UC_SM

#define UC_SM   17 /* Symbol, Math */

Definition at line 51 of file php_unicode.h.

◆ UC_SO

#define UC_SO   20 /* Symbol, Other */

Definition at line 54 of file php_unicode.h.

◆ UC_WS

#define UC_WS   30 /* Whitespace */

Definition at line 64 of file php_unicode.h.

◆ UC_ZL

#define UC_ZL   7 /* Separator, Line */

Definition at line 41 of file php_unicode.h.

◆ UC_ZP

#define UC_ZP   8 /* Separator, Paragraph */

Definition at line 42 of file php_unicode.h.

◆ UC_ZS

#define UC_ZS   6 /* Separator, Space */

Definition at line 40 of file php_unicode.h.

Enumeration Type Documentation

◆ php_case_mode

Enumerator
PHP_UNICODE_CASE_UPPER 
PHP_UNICODE_CASE_LOWER 
PHP_UNICODE_CASE_TITLE 
PHP_UNICODE_CASE_FOLD 
PHP_UNICODE_CASE_UPPER_SIMPLE 
PHP_UNICODE_CASE_LOWER_SIMPLE 
PHP_UNICODE_CASE_TITLE_SIMPLE 
PHP_UNICODE_CASE_FOLD_SIMPLE 
PHP_UNICODE_CASE_MODE_MAX 

Definition at line 80 of file php_unicode.h.

Function Documentation

◆ php_unicode_convert_case()

MBSTRING_API zend_string * php_unicode_convert_case ( php_case_mode case_mode,
const char * srcstr,
size_t srclen,
const mbfl_encoding * src_encoding,
const mbfl_encoding * dst_encoding,
int illegal_mode,
uint32_t illegal_substchar )

Definition at line 282 of file php_unicode.c.

◆ php_unicode_is_prop()

MBSTRING_API bool php_unicode_is_prop ( unsigned long code,
... )

Definition at line 69 of file php_unicode.c.

◆ php_unicode_is_prop1()

MBSTRING_API bool php_unicode_is_prop1 ( unsigned long code,
int prop )

Definition at line 64 of file php_unicode.c.