IntlChar::getPropertyEnum() - IntlChar类
IntlChar::getPropertyEnum()
版本:php7
(PHP 7)
Get the property constant value for a given property name
说明
publicstaticIntlChar::getPropertyEnum(string $alias): intReturns the property constant value for a given property name, as specified in the Unicode database file PropertyAliases.txt. Short, long, and any other variants are recognized.
In addition, this function maps the synthetic names "gcm"/ "General_Category_Mask" to the property IntlChar::PROPERTY_GENERAL_CATEGORY_MASK
. These names are not in PropertyAliases.txt.
This function compliments IntlChar::getPropertyName().
参数
$aliasThe property name to be matched. The name is compared using "loose matching" as described in PropertyAliases.txt.
返回值
Returns anIntlChar::PROPERTY_constant value, or IntlChar::PROPERTY_INVALID_CODE
if the given name does not match any property.
范例
Testing different properties
以上例程会输出:
bool(true) bool(true) bool(true) bool(true)
参见
- IntlChar::getPropertyName() Get the Unicode name for a property
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!