Collator::setStrength() - Collator类
Collator::setStrength()
collator_set_strength
(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)
Set collation strength
说明
面向对象风格publicCollator::setStrength(int $strength): bool过程化风格
collator_set_strength(Collator$coll,int $strength): bool
The » ICU Collation Service supports many levels of comparison(named "Levels", but also known as "Strengths"). Having these categories enables ICU to sort strings precisely according to local conventions. However, by allowing the levels to be selectively employed, searching for a string in text can be performed with various matching conditions.
Primary Level: Typically, this is used to denote differences between base characters(for example,"a"
以上例程会输出:
array ( 0 => 'ao', 1 => 'Ao', 2 => 'aò', ) array ( 0 => 'aò', 1 => 'Ao', 2 => 'ao', )
参见
- Collator constants
- collator_get_strength() Get current collation strength
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!