IntlChar::getIntPropertyValue() - IntlChar类
IntlChar::getIntPropertyValue()
版本:php7
(PHP 7)
Get the value for a Unicode property for a code point
说明
publicstaticIntlChar::getIntPropertyValue(mixed $codepoint,int $property): intGets the property value for an enumerated or integer Unicode property for a code point. Also returns binary and mask property values.
参数
$codepointThe integer codepoint value(e.g.0x2603forU+2603 SNOWMAN), or the character encoded as a UTF-8 string(e.g."u{2603}")
$propertyThe Unicode property to lookup(see theIntlChar::PROPERTY_*constants).
返回值
Returns the numeric value that is directly the property value or, for enumerated properties, corresponds to the numeric value of the enumerated constant of the respective property value enumeration type.
Returns0or1(for FALSE
/TRUE
)for binary Unicode properties.
Returns a bit-mask for mask properties.
Returns0if$propertyis out of bounds or if the Unicode version does not have data for the property at all, or not for this code point.
范例
Testing different properties
以上例程会输出:
bool(true) bool(true) bool(true)
参见
- IntlChar::hasBinaryProperty() Check a binary Unicode property for a code point
- IntlChar::getIntPropertyMinValue() Get the min value for a Unicode property
- IntlChar::getIntPropertyMaxValue() Get the max value for a Unicode property
- IntlChar::getUnicodeVersion() Get the Unicode version
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!