/*
* C/POSIX migration functions
*/
-PHP_FUNCTION(unicode_is_lower);
-PHP_FUNCTION(unicode_is_upper);
-PHP_FUNCTION(unicode_is_digit);
-PHP_FUNCTION(unicode_is_alpha);
-PHP_FUNCTION(unicode_is_alnum);
-PHP_FUNCTION(unicode_is_xdigit);
-PHP_FUNCTION(unicode_is_punct);
-PHP_FUNCTION(unicode_is_graph);
-PHP_FUNCTION(unicode_is_blank);
-PHP_FUNCTION(unicode_is_space);
-PHP_FUNCTION(unicode_is_cntrl);
-PHP_FUNCTION(unicode_is_print);
+PHP_FUNCTION(char_is_lower);
+PHP_FUNCTION(char_is_upper);
+PHP_FUNCTION(char_is_digit);
+PHP_FUNCTION(char_is_alpha);
+PHP_FUNCTION(char_is_alnum);
+PHP_FUNCTION(char_is_xdigit);
+PHP_FUNCTION(char_is_punct);
+PHP_FUNCTION(char_is_graph);
+PHP_FUNCTION(char_is_blank);
+PHP_FUNCTION(char_is_space);
+PHP_FUNCTION(char_is_cntrl);
+PHP_FUNCTION(char_is_print);
/*
* Additional binary property functions
*/
-PHP_FUNCTION(unicode_is_title);
-PHP_FUNCTION(unicode_is_defined);
-PHP_FUNCTION(unicode_is_id_start);
-PHP_FUNCTION(unicode_is_id_part);
-PHP_FUNCTION(unicode_is_id_ignorable);
-PHP_FUNCTION(unicode_is_iso_control);
-PHP_FUNCTION(unicode_is_mirrored);
-PHP_FUNCTION(unicode_is_base);
-PHP_FUNCTION(unicode_is_whitespace);
-PHP_FUNCTION(unicode_is_u_whitespace);
-PHP_FUNCTION(unicode_is_u_alphabetic);
-PHP_FUNCTION(unicode_is_u_uppercase);
-PHP_FUNCTION(unicode_is_u_lowercase);
+PHP_FUNCTION(char_is_defined);
+PHP_FUNCTION(char_is_id_start);
+PHP_FUNCTION(char_is_id_part);
+PHP_FUNCTION(char_is_id_ignorable);
+PHP_FUNCTION(char_is_iso_control);
+PHP_FUNCTION(char_is_mirrored);
+PHP_FUNCTION(char_is_base);
+PHP_FUNCTION(char_is_whitespace);
+PHP_FUNCTION(char_is_alphabetic);
+PHP_FUNCTION(char_is_uppercase);
+PHP_FUNCTION(char_is_lowercase);
+PHP_FUNCTION(char_is_titlecase);
/*
* Single character property functions.
*/
-PHP_FUNCTION(unicode_get_numeric_value);
-PHP_FUNCTION(unicode_get_combining_class);
-PHP_FUNCTION(unicode_get_digit_value);
-PHP_FUNCTION(unicode_get_mirror);
-PHP_FUNCTION(unicode_get_direction);
-PHP_FUNCTION(unicode_get_char_type);
-PHP_FUNCTION(unicode_is_char_valid);
+PHP_FUNCTION(char_get_numeric_value);
+PHP_FUNCTION(char_get_combining_class);
+PHP_FUNCTION(char_get_digit_value);
+PHP_FUNCTION(char_get_mirrored);
+PHP_FUNCTION(char_get_direction);
+PHP_FUNCTION(char_get_type);
+PHP_FUNCTION(char_is_valid);
+
+/*
+ * Other functions
+ */
+
+PHP_FUNCTION(char_to_digit);
+PHP_FUNCTION(char_from_digit);
+PHP_FUNCTION(char_from_name);
+PHP_FUNCTION(char_get_name);
#endif /* PHP_PROPERTY_H */
/* {{{ C/POSIX migration functions */
-PHP_FUNCTION(unicode_is_lower)
+PHP_FUNCTION(char_is_lower)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_islower);
}
-PHP_FUNCTION(unicode_is_upper)
+PHP_FUNCTION(char_is_upper)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isupper);
}
-PHP_FUNCTION(unicode_is_digit)
+PHP_FUNCTION(char_is_digit)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isdigit);
}
-PHP_FUNCTION(unicode_is_alpha)
+PHP_FUNCTION(char_is_alpha)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isalpha);
}
-PHP_FUNCTION(unicode_is_alnum)
+PHP_FUNCTION(char_is_alnum)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isalnum);
}
-PHP_FUNCTION(unicode_is_xdigit)
+PHP_FUNCTION(char_is_xdigit)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isxdigit);
}
-PHP_FUNCTION(unicode_is_punct)
+PHP_FUNCTION(char_is_punct)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_ispunct);
}
-PHP_FUNCTION(unicode_is_graph)
+PHP_FUNCTION(char_is_graph)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isgraph);
}
-PHP_FUNCTION(unicode_is_blank)
+PHP_FUNCTION(char_is_blank)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isblank);
}
-PHP_FUNCTION(unicode_is_space)
+PHP_FUNCTION(char_is_space)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isspace);
}
-PHP_FUNCTION(unicode_is_cntrl)
+PHP_FUNCTION(char_is_cntrl)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_iscntrl);
}
-PHP_FUNCTION(unicode_is_print)
+PHP_FUNCTION(char_is_print)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isprint);
}
/* {{{ Additional binary property functions */
-PHP_FUNCTION(unicode_is_title)
-{
- check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_istitle);
-}
-
-PHP_FUNCTION(unicode_is_defined)
+PHP_FUNCTION(char_is_defined)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isdefined);
}
-PHP_FUNCTION(unicode_is_id_start)
+PHP_FUNCTION(char_is_id_start)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isIDStart);
}
-PHP_FUNCTION(unicode_is_id_part)
+PHP_FUNCTION(char_is_id_part)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isIDPart);
}
-PHP_FUNCTION(unicode_is_id_ignorable)
+PHP_FUNCTION(char_is_id_ignorable)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isIDIgnorable);
}
-PHP_FUNCTION(unicode_is_iso_control)
+PHP_FUNCTION(char_is_iso_control)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isISOControl);
}
-PHP_FUNCTION(unicode_is_mirrored)
+PHP_FUNCTION(char_is_mirrored)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isMirrored);
}
-PHP_FUNCTION(unicode_is_base)
+PHP_FUNCTION(char_is_base)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isbase);
}
-PHP_FUNCTION(unicode_is_whitespace)
-{
- check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isWhitespace);
-}
-
-PHP_FUNCTION(unicode_is_u_whitespace)
+PHP_FUNCTION(char_is_whitespace)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isUWhiteSpace);
}
-PHP_FUNCTION(unicode_is_u_alphabetic)
+PHP_FUNCTION(char_is_alphabetic)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isUAlphabetic);
}
-PHP_FUNCTION(unicode_is_u_uppercase)
+PHP_FUNCTION(char_is_uppercase)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isUUppercase);
}
-PHP_FUNCTION(unicode_is_u_lowercase)
+PHP_FUNCTION(char_is_lowercase)
{
check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isULowercase);
}
+PHP_FUNCTION(char_is_titlecase)
+{
+ check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_istitle);
+}
+
+
/* }}} */
/* {{{ Single character properties */
-PHP_FUNCTION(unicode_get_numeric_value)
+PHP_FUNCTION(char_get_numeric_value)
{
UChar *str;
int str_len;
RETURN_DOUBLE(u_getNumericValue(ch));
}
-PHP_FUNCTION(unicode_get_combining_class)
+PHP_FUNCTION(char_get_combining_class)
{
UChar *str;
int str_len;
RETURN_LONG((long)u_getCombiningClass(ch));
}
-PHP_FUNCTION(unicode_get_digit_value)
+PHP_FUNCTION(char_get_digit_value)
{
UChar *str;
int str_len;
RETURN_LONG(u_charDigitValue(ch));
}
-PHP_FUNCTION(unicode_get_mirror)
+PHP_FUNCTION(char_get_mirrored)
{
UChar *str;
int str_len;
RETURN_UNICODEL(buf, buf_len, 1);
}
-PHP_FUNCTION(unicode_get_direction)
+PHP_FUNCTION(char_get_direction)
{
UChar *str;
int str_len;
RETURN_LONG((long)u_charDirection(ch));
}
-PHP_FUNCTION(unicode_get_char_type)
+PHP_FUNCTION(char_get_type)
{
UChar *str;
int str_len;
RETURN_LONG(u_charType(ch));
}
-PHP_FUNCTION(unicode_is_char_valid)
+PHP_FUNCTION(char_is_valid)
{
UChar *str;
int str_len;
PHP_FE(collator_set_default, NULL)
/* character property functions */
- PHP_FE(unicode_is_lower, NULL)
- PHP_FE(unicode_is_upper, NULL)
- PHP_FE(unicode_is_digit, NULL)
- PHP_FE(unicode_is_alpha, NULL)
- PHP_FE(unicode_is_alnum, NULL)
- PHP_FE(unicode_is_xdigit, NULL)
- PHP_FE(unicode_is_punct, NULL)
- PHP_FE(unicode_is_graph, NULL)
- PHP_FE(unicode_is_blank, NULL)
- PHP_FE(unicode_is_space, NULL)
- PHP_FE(unicode_is_cntrl, NULL)
- PHP_FE(unicode_is_print, NULL)
-
- PHP_FE(unicode_is_title, NULL)
- PHP_FE(unicode_is_defined, NULL)
- PHP_FE(unicode_is_id_start, NULL)
- PHP_FE(unicode_is_id_part, NULL)
- PHP_FE(unicode_is_id_ignorable, NULL)
- PHP_FE(unicode_is_iso_control, NULL)
- PHP_FE(unicode_is_mirrored, NULL)
- PHP_FE(unicode_is_base, NULL)
- PHP_FE(unicode_is_whitespace, NULL)
- PHP_FE(unicode_is_u_whitespace, NULL)
- PHP_FE(unicode_is_u_alphabetic, NULL)
- PHP_FE(unicode_is_u_uppercase, NULL)
- PHP_FE(unicode_is_u_lowercase, NULL)
-
- PHP_FE(unicode_get_numeric_value, NULL)
- PHP_FE(unicode_get_combining_class, NULL)
- PHP_FE(unicode_get_digit_value, NULL)
- PHP_FE(unicode_get_mirror, NULL)
- PHP_FE(unicode_get_direction, NULL)
- PHP_FE(unicode_get_char_type, NULL)
- PHP_FE(unicode_is_char_valid, NULL)
+ PHP_FE(char_is_lower, NULL)
+ PHP_FE(char_is_upper, NULL)
+ PHP_FE(char_is_digit, NULL)
+ PHP_FE(char_is_alpha, NULL)
+ PHP_FE(char_is_alnum, NULL)
+ PHP_FE(char_is_xdigit, NULL)
+ PHP_FE(char_is_punct, NULL)
+ PHP_FE(char_is_graph, NULL)
+ PHP_FE(char_is_blank, NULL)
+ PHP_FE(char_is_space, NULL)
+ PHP_FE(char_is_cntrl, NULL)
+ PHP_FE(char_is_print, NULL)
+
+ PHP_FE(char_is_defined, NULL)
+ PHP_FE(char_is_id_start, NULL)
+ PHP_FE(char_is_id_part, NULL)
+ PHP_FE(char_is_id_ignorable, NULL)
+ PHP_FE(char_is_iso_control, NULL)
+ PHP_FE(char_is_mirrored, NULL)
+ PHP_FE(char_is_base, NULL)
+ PHP_FE(char_is_whitespace, NULL)
+ PHP_FE(char_is_alphabetic, NULL)
+ PHP_FE(char_is_uppercase, NULL)
+ PHP_FE(char_is_lowercase, NULL)
+ PHP_FE(char_is_titlecase, NULL)
+
+ PHP_FE(char_get_numeric_value, NULL)
+ PHP_FE(char_get_combining_class, NULL)
+ PHP_FE(char_get_digit_value, NULL)
+ PHP_FE(char_get_mirrored, NULL)
+ PHP_FE(char_get_direction, NULL)
+ PHP_FE(char_get_type, NULL)
+ PHP_FE(char_is_valid, NULL)
{ NULL, NULL, NULL }
};