IntlChar::charFromName() - IntlChar类
IntlChar::charFromName()
版本:php7
(PHP 7)
Find Unicode character by name and return its code point value
说明
publicstaticIntlChar::charFromName(string $characterName[,int $nameChoice=IntlChar::UNICODE_CHAR_NAME
]): intFinds a Unicode character by its name and returns its code point value.
The name is matched exactly and completely. If the name does not correspond to a code point,NULL
is returned.
A Unicode 1.0 name is matched only if it differs from the modern name. Unicode names are all uppercase. Extended names are lowercase followed by an uppercase hexadecimal number, and within angle brackets.
参数
$characterNameFull name of the Unicode character.
$nameChoiceWhich set of names to use for the lookup. Can be any of these constants:
IntlChar::UNICODE_CHAR_NAME
(default)IntlChar::UNICODE_10_CHAR_NAME
IntlChar::EXTENDED_CHAR_NAME
IntlChar::CHAR_NAME_ALIAS
IntlChar::CHAR_NAME_CHOICE_COUNT
返回值
The Unicode value of the code point with the given name(as an integer), or NULL
if there is no such code point.
范例
Testing different code points
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!