From 84c9b4f290b68abfff2d182ded06be8bc9525c07 Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Tue, 2 May 2006 22:43:52 +0000 Subject: [PATCH] Some additional binary property functions. --- ext/unicode/property.c | 69 ++++++++++++++++++++++++++++++++++++++++++ ext/unicode/unicode.c | 14 +++++++++ 2 files changed, 83 insertions(+) diff --git a/ext/unicode/property.c b/ext/unicode/property.c index 61df1b7b3a..8daecd8cd4 100644 --- a/ext/unicode/property.c +++ b/ext/unicode/property.c @@ -109,6 +109,75 @@ PHP_FUNCTION(unicode_is_print) /* }}} */ +/* + * Additional binary property functions + */ + +PHP_FUNCTION(unicode_is_title) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_istitle); +} + +PHP_FUNCTION(unicode_is_defined) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isdefined); +} + +PHP_FUNCTION(unicode_is_id_start) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isIDStart); +} + +PHP_FUNCTION(unicode_is_id_part) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isIDPart); +} + +PHP_FUNCTION(unicode_is_id_ignorable) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isIDIgnorable); +} + +PHP_FUNCTION(unicode_is_iso_control) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isISOControl); +} + +PHP_FUNCTION(unicode_is_mirrored) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isMirrored); +} + +PHP_FUNCTION(unicode_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) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isUWhiteSpace); +} + +PHP_FUNCTION(unicode_is_u_alphabetic) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isUAlphabetic); +} + +PHP_FUNCTION(unicode_is_u_uppercase) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isUUppercase); +} + +PHP_FUNCTION(unicode_is_u_lowercase) +{ + check_property_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, u_isULowercase); +} + /* * Local variables: diff --git a/ext/unicode/unicode.c b/ext/unicode/unicode.c index 8ab19ec899..dde3ef54af 100644 --- a/ext/unicode/unicode.c +++ b/ext/unicode/unicode.c @@ -262,6 +262,20 @@ zend_function_entry unicode_functions[] = { 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) + { NULL, NULL, NULL } }; /* }}} */ -- 2.50.1