30 $cp = Collator::create(
$lang );
31 $cp->setStrength( Collator::PRIMARY );
32 $baseBin = $cp->getSortKey(
$base );
34 $baseBin =
rtrim( $baseBin,
"\0" );
35 $extendedBin = $cp->getSortKey( $extended );
63 $cp = Collator::create(
$lang );
64 $cp->setStrength( Collator::PRIMARY );
65 $baseBin = $cp->getSortKey(
$base );
67 $baseBin =
rtrim( $baseBin,
"\0" );
68 $extendedBin = $cp->getSortKey( $extended );
75 [
'en',
'AC',
'ABC' ],
92 $this->
assertEquals( $firstLetter, $col->getFirstLetter( $string ) );
97 [
'uppercase',
'Abc',
'A' ],
98 [
'uppercase',
'abc',
'A' ],
99 [
'identity',
'abc',
'a' ],
100 [
'uca-en',
'abc',
'A' ],
101 [
'uca-en',
' ',
' ' ],
102 [
'uca-en',
'Êveryone',
'E' ],
103 [
'uca-vi',
'Êveryone',
'Ê' ],
105 [
'uca-sv',
'The',
'T' ],
106 [
'uca-sv',
'Å',
'Å' ],
107 [
'uca-hu',
'dzsdo',
'Dzs' ],
108 [
'uca-hu',
'dzdso',
'Dz' ],
109 [
'uca-hu',
'CSD',
'Cs' ],
110 [
'uca-root',
'CSD',
'C' ],
111 [
'uca-fi',
'Ǥ',
'G' ],
112 [
'uca-fi',
'Ŧ',
'T' ],
113 [
'uca-fi',
'Ʒ',
'Z' ],
114 [
'uca-fi',
'Ŋ',
'N' ],
115 [
'uppercase-ba',
'в',
'В' ],
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Class CollationTest Collation IcuCollation IdentityCollation UppercaseCollation.
static notPrefixDataProvider()
testIsPrefix( $lang, $base, $extended)
Test to make sure, that if you have "X" and "XY", the binary sortkey also has "X" being a prefix of "...
testGetFirstLetter( $collation, $string, $firstLetter)
Test correct first letter is fetched.
static prefixDataProvider()
testNotIsPrefix( $lang, $base, $extended)
Opposite of testIsPrefix.
static factory( $collationName)
if(!isset( $args[0])) $lang