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 );
36 $this->assertStringStartsWith( $baseBin, $extendedBin,
"$base is not a prefix of $extended" );
41 array(
'en',
'A',
'AA' ),
42 array(
'en',
'A',
'AAA' ),
43 array(
'en',
'Д',
'ДЂ' ),
44 array(
'en',
'Д',
'ДA' ),
46 array(
'fi',
'Z',
'Ʒ' ),
48 array(
'sv',
't',
'Þ' ),
51 array(
'en',
'ꦲ',
'ꦲꦤ' ),
52 array(
'en',
'ꦲ',
'ꦲД' ),
53 array(
'en',
'A',
'Aꦲ' ),
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 );
69 $this->assertStringStartsNotWith( $baseBin, $extendedBin,
"$base is a prefix of $extended" );
74 array(
'en',
'A',
'B' ),
75 array(
'en',
'AC',
'ABC' ),
76 array(
'en',
'Z',
'Ʒ' ),
77 array(
'en',
'A',
'ꦲ' ),
92 $this->assertEquals( $firstLetter, $col->getFirstLetter( $string ) );
97 array(
'uppercase',
'Abc',
'A' ),
98 array(
'uppercase',
'abc',
'A' ),
99 array(
'identity',
'abc',
'a' ),
100 array(
'uca-en',
'abc',
'A' ),
101 array(
'uca-en',
' ',
' ' ),
102 array(
'uca-en',
'Êveryone',
'E' ),
103 array(
'uca-vi',
'Êveryone',
'Ê' ),
105 array(
'uca-sv',
'The',
'T' ),
106 array(
'uca-sv',
'Å',
'Å' ),
107 array(
'uca-hu',
'dzsdo',
'Dzs' ),
108 array(
'uca-hu',
'dzdso',
'Dz' ),
109 array(
'uca-hu',
'CSD',
'Cs' ),
110 array(
'uca-root',
'CSD',
'C' ),
111 array(
'uca-fi',
'Ǥ',
'G' ),
112 array(
'uca-fi',
'Ŧ',
'T' ),
113 array(
'uca-fi',
'Ʒ',
'Z' ),
114 array(
'uca-fi',
'Ŋ',
'N' ),