Implement ICU Grapheme API
[hiphop-php.git] / hphp / test / zend / good / ext / intl / tests / grapheme.php.expectf
blobea20ff745fa5f53d652b593ad3dd2fe810b54089
1 function grapheme_strlen($string) {}
3 "hindi" in devanagari strlen 3
4 "ab" + "hindi" + "cde" strlen 8
5 "" strlen 0
6 char_a_ring_nfd strlen 1
7 char_a_ring_nfd + "bc" strlen 3
8 "abc" strlen 3
10 function grapheme_strpos($haystack, $needle, $offset = 0) {}
12 find "o" in "aa%CC%8Abco%CC%88o" - grapheme_strpos = 5 == 5
13 find "o" in "aa%CC%8Abco%CC%88" - grapheme_strpos = false == false
14 find "o%CC%88" in "aa%CC%8Abco%CC%88" - grapheme_strpos = 4 == 4
15 find "a%CC%8A" in "o%CC%88aa%CC%8Abc" - grapheme_strpos = 2 == 2
16 find "a%CC%8A" in "aa%CC%8Abc" - grapheme_strpos = 1 == 1
17 find "a%CC%8A" in "abc" - grapheme_strpos = false == false
18 find "a" in "a%CC%8Abc" - grapheme_strpos = false == false
19 find "d" in "abc" - grapheme_strpos = false == false
20 find "c" in "abc" - grapheme_strpos = 2 == 2
21 find "b" in "abc" - grapheme_strpos = 1 == 1
22 find "a" in "abc" - grapheme_strpos = 0 == 0
23 find "a" in "abc" - grapheme_strpos from 0 = 0 == 0
24 find "a" in "abc" - grapheme_strpos from 1 = false == false
25 find "a" in "ababc" - grapheme_strpos from 1 = 2 == 2
26 find "o" in "aoa%CC%8Abco%CC%88o" - grapheme_strpos from 2 = 6 == 6
27 find "a%CC%8A" in "o%CC%88a%CC%8Aaa%CC%8Abc" - grapheme_strpos from 2 = 3 == 3
28 find "op" in "aa%CC%8Abco%CC%88opq" - grapheme_strpos = 5 == 5
29 find "opq" in "aa%CC%8Abco%CC%88opq" - grapheme_strpos = 5 == 5
30 find "abc" in "aa%CC%8Abco%CC%88" - grapheme_strpos = false == false
31 find "o%CC%88bco%CC%88" in "aa%CC%8Abco%CC%88bco%CC%88" - grapheme_strpos = 4 == 4
32 find "a%CC%8Abc" in "o%CC%88aa%CC%8Abc" - grapheme_strpos = 2 == 2
33 find "a%CC%8Abc" in "aa%CC%8Abc" - grapheme_strpos = 1 == 1
34 find "a%CC%8Abc" in "abc" - grapheme_strpos = false == false
35 find "abcdefg" in "a%CC%8Abc" - grapheme_strpos = false == false
36 find "defghijklmnopq" in "abc" - grapheme_strpos = false == false
37 find "ab" in "abc" - grapheme_strpos = 0 == 0
38 find "bc" in "abc" - grapheme_strpos = 1 == 1
39 find "abc" in "abc" - grapheme_strpos = 0 == 0
40 find "abcd" in "abc" - grapheme_strpos = false == false
41 find "ab" in "abc" - grapheme_strpos from 0 = 0 == 0
42 find "abc" in "abc" - grapheme_strpos from 0 = 0 == 0
43 find "abc" in "abc" - grapheme_strpos from 1 = false == false
44 find "ab" in "ababc" - grapheme_strpos from 1 = 2 == 2
45 find "abc" in "ababc" - grapheme_strpos from 1 = 2 == 2
46 find "oa%CC%8Abc" in "aoa%CC%8Abco%CC%88oa%CC%8Abc" - grapheme_strpos from 2 = 6 == 6
47 find "a%CC%8Abca%CC%8A" in "o%CC%88a%CC%8Aaa%CC%8Abca%CC%8Adef" - grapheme_strpos from 2 = 3 == 3
49 function grapheme_stripos($haystack, $needle, $offset = 0) {}
51 find "o" in "aoa%CC%8Abco%CC%88O" - grapheme_stripos from 2 = 6 == 6
52 find "a%CC%8A" in "o%CC%88a%CC%8AaA%CC%8Abc" - grapheme_stripos from 2 = 3 == 3
53 find "o" in "aa%CC%8Abco%CC%88O" - grapheme_stripos = 5 == 5
54 find "O" in "aa%CC%8Abco%CC%88" - grapheme_stripos = false == false
55 find "o%CC%88" in "aa%CC%8AbcO%CC%88" - grapheme_stripos = 4 == 4
56 find "A%CC%8A" in "o%CC%88aa%CC%8Abc" - grapheme_stripos = 2 == 2
57 find "a%CC%8A" in "aA%CC%8Abc" - grapheme_stripos = 1 == 1
58 find "a%CC%8A" in "Abc" - grapheme_stripos = false == false
59 find "A" in "a%CC%8Abc" - grapheme_stripos = false == false
60 find "D" in "abc" - grapheme_stripos = false == false
61 find "c" in "abC" - grapheme_stripos = 2 == 2
62 find "B" in "abc" - grapheme_stripos = 1 == 1
63 find "a" in "Abc" - grapheme_stripos = 0 == 0
64 find "A" in "abc" - grapheme_stripos from 0 = 0 == 0
65 find "a" in "Abc" - grapheme_stripos from 1 = false == false
66 find "A" in "ababc" - grapheme_stripos from 1 = 2 == 2
67 find "oP" in "aa%CC%8Abco%CC%88Opq" - grapheme_stripos = 5 == 5
68 find "opQ" in "aa%CC%8Abco%CC%88Opq" - grapheme_stripos = 5 == 5
69 find "abc" in "aa%CC%8Abco%CC%88" - grapheme_stripos = false == false
70 find "O%CC%88bco%CC%88" in "aa%CC%8Abco%CC%88bCo%CC%88" - grapheme_stripos = 4 == 4
71 find "A%CC%8Abc" in "o%CC%88aa%CC%8ABc" - grapheme_stripos = 2 == 2
72 find "a%CC%8Abc" in "aa%CC%8ABC" - grapheme_stripos = 1 == 1
73 find "a%CC%8ABC" in "abc" - grapheme_stripos = false == false
74 find "aBCdefg" in "a%CC%8ABC" - grapheme_stripos = false == false
75 find "Defghijklmnopq" in "aBC" - grapheme_stripos = false == false
76 find "Ab" in "abC" - grapheme_stripos = 0 == 0
77 find "bc" in "aBC" - grapheme_stripos = 1 == 1
78 find "Abc" in "abC" - grapheme_stripos = 0 == 0
79 find "aBcd" in "abC" - grapheme_stripos = false == false
80 find "ab" in "ABc" - grapheme_stripos from 0 = 0 == 0
81 find "abC" in "aBc" - grapheme_stripos from 0 = 0 == 0
82 find "aBc" in "abc" - grapheme_stripos from 1 = false == false
83 find "AB" in "ABabc" - grapheme_stripos from 1 = 2 == 2
84 find "aBc" in "abaBc" - grapheme_stripos from 1 = 2 == 2
85 find "Oa%CC%8AbC" in "aoa%CC%8Abco%CC%88oA%CC%8AbC" - grapheme_stripos from 2 = 6 == 6
86 find "a%CC%8ABca%CC%8A" in "o%CC%88a%CC%8AaA%CC%8AbCa%CC%8Adef" - grapheme_stripos from 2 = 3 == 3
88 function grapheme_strrpos($haystack, $needle, $offset = 0) {}
90 find "o" in "aa%CC%8Abco%CC%88o" - grapheme_strrpos = 5 == 5
91 find "o" in "aa%CC%8Abco%CC%88" - grapheme_strrpos = false == false
92 find "o%CC%88" in "aa%CC%8Abco%CC%88" - grapheme_strrpos = 4 == 4
93 find "a%CC%8A" in "o%CC%88aa%CC%8Abc" - grapheme_strrpos = 2 == 2
94 find "a%CC%8A" in "aa%CC%8Abc" - grapheme_strrpos = 1 == 1
95 find "a%CC%8A" in "abc" - grapheme_strrpos = false == false
96 find "a" in "a%CC%8Abc" - grapheme_strrpos = false == false
97 find "d" in "abc" - grapheme_strrpos = false == false
98 find "c" in "abc" - grapheme_strrpos = 2 == 2
99 find "b" in "abc" - grapheme_strrpos = 1 == 1
100 find "a" in "abc" - grapheme_strrpos = 0 == 0
101 find "a" in "abc" - grapheme_strrpos from 0 = 0 == 0
102 find "a" in "abc" - grapheme_strrpos from 1 = false == false
103 find "a" in "ababc" - grapheme_strrpos from 1 = 2 == 2
104 find "o" in "aoa%CC%8Abco%CC%88o" - grapheme_strrpos from 2 = 6 == 6
105 find "a%CC%8A" in "o%CC%88a%CC%8Aaa%CC%8Abc" - grapheme_strrpos from 2 = 3 == 3
106 find "op" in "aa%CC%8Abco%CC%88opq" - grapheme_strrpos = 5 == 5
107 find "opq" in "aa%CC%8Abco%CC%88opq" - grapheme_strrpos = 5 == 5
108 find "abc" in "aa%CC%8Abco%CC%88" - grapheme_strrpos = false == false
109 find "o%CC%88bco%CC%88" in "aa%CC%8Abco%CC%88bco%CC%88" - grapheme_strrpos = 4 == 4
110 find "a%CC%8Abc" in "o%CC%88aa%CC%8Abc" - grapheme_strrpos = 2 == 2
111 find "a%CC%8Abc" in "aa%CC%8Abc" - grapheme_strrpos = 1 == 1
112 find "a%CC%8Abc" in "abc" - grapheme_strrpos = false == false
113 find "abcdefg" in "a%CC%8Abc" - grapheme_strrpos = false == false
114 find "defghijklmnopq" in "abc" - grapheme_strrpos = false == false
115 find "ab" in "abc" - grapheme_strrpos = 0 == 0
116 find "bc" in "abc" - grapheme_strrpos = 1 == 1
117 find "abc" in "abc" - grapheme_strrpos = 0 == 0
118 find "abcd" in "abc" - grapheme_strrpos = false == false
119 find "ab" in "abc" - grapheme_strrpos from 0 = 0 == 0
120 find "abc" in "abc" - grapheme_strrpos from 0 = 0 == 0
121 find "abc" in "abc" - grapheme_strrpos from 1 = false == false
122 find "ab" in "ababc" - grapheme_strrpos from 1 = 2 == 2
123 find "abc" in "ababc" - grapheme_strrpos from 1 = 2 == 2
124 find "oa%CC%8Abc" in "aoa%CC%8Abco%CC%88oa%CC%8Abc" - grapheme_strrpos from 2 = 6 == 6
125 find "a%CC%8Abca%CC%8A" in "o%CC%88a%CC%8Aaa%CC%8Abca%CC%8Adef" - grapheme_strrpos from 2 = 3 == 3
127 function grapheme_strripos($haystack, $needle, $offset = 0) {}
129 find "o" in "aoa%CC%8Abco%CC%88O" - grapheme_strripos from 2 = 6 == 6
130 find "a%CC%8A" in "o%CC%88a%CC%8AaA%CC%8Abc" - grapheme_strripos from 2 = 3 == 3
131 find "o" in "aa%CC%8Abco%CC%88O" - grapheme_strripos = 5 == 5
132 find "O" in "aa%CC%8Abco%CC%88" - grapheme_strripos = false == false
133 find "o%CC%88" in "aa%CC%8AbcO%CC%88" - grapheme_strripos = 4 == 4
134 find "A%CC%8A" in "o%CC%88aa%CC%8Abc" - grapheme_strripos = 2 == 2
135 find "a%CC%8A" in "aA%CC%8Abc" - grapheme_strripos = 1 == 1
136 find "a%CC%8A" in "Abc" - grapheme_strripos = false == false
137 find "A" in "a%CC%8Abc" - grapheme_strripos = false == false
138 find "D" in "abc" - grapheme_strripos = false == false
139 find "c" in "abC" - grapheme_strripos = 2 == 2
140 find "B" in "abc" - grapheme_strripos = 1 == 1
141 find "a" in "Abc" - grapheme_strripos = 0 == 0
142 find "A" in "abc" - grapheme_strripos from 0 = 0 == 0
143 find "a" in "Abc" - grapheme_strripos from 1 = false == false
144 find "A" in "ababc" - grapheme_strripos from 1 = 2 == 2
145 find "oP" in "aa%CC%8Abco%CC%88Opq" - grapheme_strripos = 5 == 5
146 find "opQ" in "aa%CC%8Abco%CC%88Opq" - grapheme_strripos = 5 == 5
147 find "abc" in "aa%CC%8Abco%CC%88" - grapheme_strripos = false == false
148 find "O%CC%88bco%CC%88" in "aa%CC%8Abco%CC%88bCo%CC%88" - grapheme_strripos = 4 == 4
149 find "A%CC%8Abc" in "o%CC%88aa%CC%8ABc" - grapheme_strripos = 2 == 2
150 find "a%CC%8Abc" in "aa%CC%8ABC" - grapheme_strripos = 1 == 1
151 find "a%CC%8ABC" in "abc" - grapheme_strripos = false == false
152 find "aBCdefg" in "a%CC%8ABC" - grapheme_strripos = false == false
153 find "Defghijklmnopq" in "aBC" - grapheme_strripos = false == false
154 find "Ab" in "abC" - grapheme_strripos = 0 == 0
155 find "bc" in "aBC" - grapheme_strripos = 1 == 1
156 find "Abc" in "abC" - grapheme_strripos = 0 == 0
157 find "aBcd" in "abC" - grapheme_strripos = false == false
158 find "ab" in "ABc" - grapheme_strripos from 0 = 0 == 0
159 find "abC" in "aBc" - grapheme_strripos from 0 = 0 == 0
160 find "aBc" in "abc" - grapheme_strripos from 1 = false == false
161 find "AB" in "ABabc" - grapheme_strripos from 1 = 2 == 2
162 find "aBc" in "abaBc" - grapheme_strripos from 1 = 2 == 2
163 find "Oa%CC%8AbC" in "aoa%CC%8Abco%CC%88oA%CC%8AbC" - grapheme_strripos from 2 = 6 == 6
164 find "a%CC%8ABca%CC%8A" in "o%CC%88a%CC%8AaA%CC%8AbCa%CC%8Adef" - grapheme_strripos from 2 = 3 == 3
166 function grapheme_substr($string, $start, $length = -1) {}
168 substring of "abc" from "3" - grapheme_substr = false == false
169 substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = false == false
170 substring of "aoa%CC%8Abco%CC%88O" from "2" - grapheme_substr = a%CC%8Abco%CC%88O == a%CC%8Abco%CC%88O
171 substring of "o%CC%88a%CC%8AaA%CC%8Abc" from "2" - grapheme_substr = aA%CC%8Abc == aA%CC%8Abc
172 substring of "aa%CC%8Abco%CC%88O" from "5" - grapheme_substr = O == O
173 substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = false == false
174 substring of "aa%CC%8AbcO%CC%88" from "4" - grapheme_substr = O%CC%88 == O%CC%88
175 substring of "o%CC%88aa%CC%8Abc" from "2" - grapheme_substr = a%CC%8Abc == a%CC%8Abc
176 substring of "aA%CC%8Abc" from "1" - grapheme_substr = A%CC%8Abc == A%CC%8Abc
177 substring of "Abc" from "-5" - grapheme_substr = false == false
178 substring of "a%CC%8Abc" from "3" - grapheme_substr = false == false
179 substring of "abc" from "4" - grapheme_substr = false == false
180 substring of "abC" from "2" - grapheme_substr = C == C
181 substring of "abc" from "1" - grapheme_substr = bc == bc
182 substring of "Abc" from "1" - grapheme_substr with length 1 = b == b
183 substring of "abc" from "0" - grapheme_substr with length 2 = ab == ab
184 substring of "Abc" from "-4" - grapheme_substr with length 1 = false == false
185 substring of "ababc" from "1" - grapheme_substr with length 2 = ba == ba
186 substring of "ababc" from "0" - grapheme_substr with length 10 = ababc == ababc
187 substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length 10 = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq
188 substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr = Opq == Opq
189 substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -1 = Op == Op
190 substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -2 = O == O
191 substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -3 =  == 
192 substring of "aa%CC%8Abco%CC%88Opq" from "5" - grapheme_substr with length -4 = false == false
193 substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq
194 substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -1 = aa%CC%8Abco%CC%88Op == aa%CC%8Abco%CC%88Op
195 substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -2 = aa%CC%8Abco%CC%88O == aa%CC%8Abco%CC%88O
196 substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -3 = aa%CC%8Abco%CC%88 == aa%CC%8Abco%CC%88
197 substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -4 = aa%CC%8Abc == aa%CC%8Abc
198 substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -5 = aa%CC%8Ab == aa%CC%8Ab
199 substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -6 = aa%CC%8A == aa%CC%8A
200 substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -7 = a == a
201 substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -8 =  == 
202 substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -9 = false == false
203 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq
204 substring of "aa%CC%8Abco%CC%88Opq" from "-7" - grapheme_substr = a%CC%8Abco%CC%88Opq == a%CC%8Abco%CC%88Opq
205 substring of "aa%CC%8Abco%CC%88Opq" from "-6" - grapheme_substr = bco%CC%88Opq == bco%CC%88Opq
206 substring of "aa%CC%8Abco%CC%88Opq" from "-5" - grapheme_substr = co%CC%88Opq == co%CC%88Opq
207 substring of "aa%CC%8Abco%CC%88Opq" from "-4" - grapheme_substr = o%CC%88Opq == o%CC%88Opq
208 substring of "aa%CC%8Abco%CC%88Opq" from "-3" - grapheme_substr = Opq == Opq
209 substring of "aa%CC%8Abco%CC%88Opq" from "-2" - grapheme_substr = pq == pq
210 substring of "aa%CC%8Abco%CC%88Opq" from "-1" - grapheme_substr = q == q
211 substring of "aa%CC%8Abco%CC%88Opq" from "-999" - grapheme_substr = false == false
212 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 8 = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq
213 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 7 = aa%CC%8Abco%CC%88Op == aa%CC%8Abco%CC%88Op
214 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 6 = aa%CC%8Abco%CC%88O == aa%CC%8Abco%CC%88O
215 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 5 = aa%CC%8Abco%CC%88 == aa%CC%8Abco%CC%88
216 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 4 = aa%CC%8Abc == aa%CC%8Abc
217 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 3 = aa%CC%8Ab == aa%CC%8Ab
218 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 2 = aa%CC%8A == aa%CC%8A
219 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 1 = a == a
220 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 0 =  == 
221 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -999 = false == false
222 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -1 = aa%CC%8Abco%CC%88Op == aa%CC%8Abco%CC%88Op
223 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -2 = aa%CC%8Abco%CC%88O == aa%CC%8Abco%CC%88O
224 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -3 = aa%CC%8Abco%CC%88 == aa%CC%8Abco%CC%88
225 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -4 = aa%CC%8Abc == aa%CC%8Abc
226 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -5 = aa%CC%8Ab == aa%CC%8Ab
227 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -6 = aa%CC%8A == aa%CC%8A
228 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -7 = a == a
229 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -8 =  == 
230 substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -9 = false == false
232 function grapheme_strstr($haystack, $needle, $before_needle = FALSE) {}
234 find "o" in "aa%CC%8Abco%CC%88o" - grapheme_strstr = o == o
235 find "o" in "aa%CC%8Abco%CC%88" - grapheme_strstr = false == false
236 find "o%CC%88" in "aa%CC%8Abco%CC%88" - grapheme_strstr = o%CC%88 == o%CC%88
237 find "a%CC%8A" in "o%CC%88aa%CC%8Abc" - grapheme_strstr = a%CC%8Abc == a%CC%8Abc
238 find "a%CC%8A" in "aa%CC%8Abc" - grapheme_strstr = a%CC%8Abc == a%CC%8Abc
239 find "a%CC%8A" in "abc" - grapheme_strstr = false == false
240 find "a" in "a%CC%8Abc" - grapheme_strstr = false == false
241 find "d" in "abc" - grapheme_strstr = false == false
242 find "c" in "abc" - grapheme_strstr = c == c
243 find "b" in "abc" - grapheme_strstr = bc == bc
244 find "a" in "abc" - grapheme_strstr = abc == abc
245 find "ab" in "abc" - grapheme_strstr = abc == abc
246 find "abc" in "abc" - grapheme_strstr = abc == abc
247 find "bc" in "abc" - grapheme_strstr = bc == bc
248 find "a" in "abc" - grapheme_strstr before flag is FALSE = abc == abc
249 find "a" in "abc" - grapheme_strstr before flag is TRUE =  == 
250 find "b" in "abc" - grapheme_strstr before flag is TRUE = a == a
251 find "c" in "abc" - grapheme_strstr before flag is TRUE = ab == ab
252 find "bab" in "ababc" - grapheme_strstr before flag is TRUE = a == a
253 find "abc" in "ababc" - grapheme_strstr before flag is TRUE = ab == ab
254 find "abc" in "ababc" - grapheme_strstr before flag is FALSE = abc == abc
255 find "d" in "aba%CC%8Ac" - grapheme_strstr = false == false
256 find "a" in "bca%CC%8Aa" - grapheme_strstr = a == a
257 find "b" in "aa%CC%8Abc" - grapheme_strstr = bc == bc
258 find "a" in "a%CC%8Abc" - grapheme_strstr = false == false
259 find "ab" in "a%CC%8Aabc" - grapheme_strstr = abc == abc
260 find "abc" in "abca%CC%8A" - grapheme_strstr = abca%CC%8A == abca%CC%8A
261 find "a%CC%8Abc" in "aa%CC%8Abc" - grapheme_strstr = a%CC%8Abc == a%CC%8Abc
262 find "a%CC%8A" in "aa%CC%8Abc" - grapheme_strstr before flag is FALSE = a%CC%8Abc == a%CC%8Abc
263 find "a" in "aa%CC%8Abc" - grapheme_strstr before flag is TRUE =  == 
264 find "b" in "a%CC%8Aabc" - grapheme_strstr before flag is TRUE = a%CC%8Aa == a%CC%8Aa
265 find "c" in "aba%CC%8Ac" - grapheme_strstr before flag is TRUE = aba%CC%8A == aba%CC%8A
266 find "baa%CC%8Ab" in "abaa%CC%8Abc" - grapheme_strstr before flag is TRUE = a == a
267 find "abca%CC%8A" in "ababca%CC%8A" - grapheme_strstr before flag is TRUE = ab == ab
268 find "aba%CC%8Ac" in "ababa%CC%8Ac" - grapheme_strstr before flag is FALSE = aba%CC%8Ac == aba%CC%8Ac
270 function grapheme_stristr($haystack, $needle, $before_needle = FALSE) {}
272 find "O%CC%88" in "aa%CC%8Abco%CC%88" - grapheme_stristr = o%CC%88 == o%CC%88
273 find "o" in "aa%CC%8Abco%CC%88O" - grapheme_stristr = O == O
274 find "o" in "aa%CC%8Abco%CC%88" - grapheme_stristr = false == false
275 find "a%CC%8A" in "o%CC%88aa%CC%8Abc" - grapheme_stristr = a%CC%8Abc == a%CC%8Abc
276 find "A%CC%8A" in "aa%CC%8Abc" - grapheme_stristr = a%CC%8Abc == a%CC%8Abc
277 find "a%CC%8A" in "abc" - grapheme_stristr = false == false
278 find "A" in "a%CC%8Abc" - grapheme_stristr = false == false
279 find "d" in "abc" - grapheme_stristr = false == false
280 find "C" in "abc" - grapheme_stristr = c == c
281 find "b" in "aBc" - grapheme_stristr = Bc == Bc
282 find "A" in "abc" - grapheme_stristr = abc == abc
283 find "ab" in "abC" - grapheme_stristr = abC == abC
284 find "aBc" in "abc" - grapheme_stristr = abc == abc
285 find "bc" in "abC" - grapheme_stristr = bC == bC
286 find "A" in "abc" - grapheme_stristr before flag is FALSE = abc == abc
287 find "a" in "abc" - grapheme_stristr before flag is TRUE =  == 
288 find "b" in "aBc" - grapheme_stristr before flag is TRUE = a == a
289 find "C" in "abc" - grapheme_stristr before flag is TRUE = ab == ab
290 find "bab" in "aBabc" - grapheme_stristr before flag is TRUE = a == a
291 find "aBc" in "ababc" - grapheme_stristr before flag is TRUE = ab == ab
292 find "abC" in "ababc" - grapheme_stristr before flag is FALSE = abc == abc
293 find "d" in "aba%CC%8Ac" - grapheme_stristr = false == false
294 find "a" in "bca%CC%8AA" - grapheme_stristr = A == A
295 find "B" in "aa%CC%8Abc" - grapheme_stristr = bc == bc
296 find "a" in "A%CC%8Abc" - grapheme_stristr = false == false
297 find "Ab" in "a%CC%8Aabc" - grapheme_stristr = abc == abc
298 find "abc" in "abcA%CC%8A" - grapheme_stristr = abcA%CC%8A == abcA%CC%8A
299 find "A%CC%8Abc" in "aa%CC%8Abc" - grapheme_stristr = a%CC%8Abc == a%CC%8Abc
300 find "a%CC%8A" in "aA%CC%8Abc" - grapheme_stristr before flag is FALSE = A%CC%8Abc == A%CC%8Abc
301 find "A" in "aa%CC%8Abc" - grapheme_stristr before flag is TRUE =  == 
302 find "b" in "a%CC%8AaBc" - grapheme_stristr before flag is TRUE = a%CC%8Aa == a%CC%8Aa
303 find "C" in "aba%CC%8Ac" - grapheme_stristr before flag is TRUE = aba%CC%8A == aba%CC%8A
304 find "baa%CC%8Ab" in "abaA%CC%8Abc" - grapheme_stristr before flag is TRUE = a == a
305 find "aBcA%CC%8A" in "ababca%CC%8A" - grapheme_stristr before flag is TRUE = ab == ab
306 find "aba%CC%8Ac" in "abABA%CC%8Ac" - grapheme_stristr before flag is FALSE = ABA%CC%8Ac == ABA%CC%8Ac
308 function grapheme_extract($haystack, $size, $extract_type = GRAPHEME_EXTR_COUNT, $start = 0[, $next])
310 extract from "abc" "3" graphemes - grapheme_extract = abc == abc
311 extract from "abc" "2" graphemes - grapheme_extract = ab == ab
312 extract from "abc" "1" graphemes - grapheme_extract = a == a
313 extract from "abc" "0" graphemes - grapheme_extract =  == 
314 extract from "abc" "1" graphemes - grapheme_extract starting at byte position 0 = a == a
315 extract from "abc" "1" graphemes - grapheme_extract starting at byte position 1 = b == b
316 extract from "abc" "1" graphemes - grapheme_extract starting at byte position 2 = c == c
317 extract from "abc" "0" graphemes - grapheme_extract starting at byte position 2 =  == 
318 extract from "abc" "3" graphemes - grapheme_extract starting at byte position 0 with $next = abc == abc $next=3 == 3 
319 extract from "abc" "2" graphemes - grapheme_extract starting at byte position 0 with $next = ab == ab $next=2 == 2 
320 extract from "abc" "1" graphemes - grapheme_extract starting at byte position 0 with $next = a == a $next=1 == 1 
321 extract from "abc" "0" graphemes - grapheme_extract starting at byte position 0 with $next =  ==  $next=0 == 0 
322 extract from "abc" "1" graphemes - grapheme_extract starting at byte position 0 with $next = a == a $next=1 == 1 
323 extract from "abc" "1" graphemes - grapheme_extract starting at byte position 1 with $next = b == b $next=2 == 2 
324 extract from "abc" "1" graphemes - grapheme_extract starting at byte position 2 with $next = c == c $next=3 == 3 
325 extract from "abc" "0" graphemes - grapheme_extract starting at byte position 2 with $next =  ==  $next=2 == 2 
326 extract from "http%3A%2F%2Fnews.bbc.co.uk%2F2%2Fhi%2Fmiddle_east%2F7831588.stm" "48" graphemes - grapheme_extract starting at byte position 48 with $next = tm == tm $next=50 == 50 
327 extract from "a%CC%8Abc" "3" graphemes - grapheme_extract = a%CC%8Abc == a%CC%8Abc
328 extract from "a%CC%8Abc" "2" graphemes - grapheme_extract = a%CC%8Ab == a%CC%8Ab
329 extract from "a%CC%8Abc" "1" graphemes - grapheme_extract = a%CC%8A == a%CC%8A
330 extract from "a%CC%8Abc" "3" graphemes - grapheme_extract starting at byte position 0 with $next = a%CC%8Abc == a%CC%8Abc $next=5 == 5 
331 extract from "a%CC%8Abc" "2" graphemes - grapheme_extract starting at byte position 0 with $next = a%CC%8Ab == a%CC%8Ab $next=4 == 4 
332 extract from "a%CC%8Abc" "1" graphemes - grapheme_extract starting at byte position 0 with $next = a%CC%8A == a%CC%8A $next=3 == 3 
333 extract from "a%CC%8Abcde" "2" graphemes - grapheme_extract starting at byte position 3 with $next = bc == bc $next=5 == 5 
334 extract from "a%CC%8Abcde" "2" graphemes - grapheme_extract starting at byte position 4 with $next = cd == cd $next=6 == 6 
335 extract from "a%CC%8Abcdea%CC%8Af" "4" graphemes - grapheme_extract starting at byte position 5 with $next = dea%CC%8Af == dea%CC%8Af $next=11 == 11 
336 extract from "a%CC%8Ao%CC%88o%CC%88" "3" graphemes - grapheme_extract = a%CC%8Ao%CC%88o%CC%88 == a%CC%8Ao%CC%88o%CC%88
337 extract from "a%CC%8Ao%CC%88o%CC%88" "2" graphemes - grapheme_extract = a%CC%8Ao%CC%88 == a%CC%8Ao%CC%88
338 extract from "a%CC%8Ao%CC%88c" "1" graphemes - grapheme_extract = a%CC%8A == a%CC%8A
339 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "1" graphemes - grapheme_extract starting at byte position 0 = o%CC%88 == o%CC%88
340 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "1" graphemes - grapheme_extract starting at byte position 2 = o%CC%88 == o%CC%88
341 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "1" graphemes - grapheme_extract starting at byte position 3 = o%CC%88 == o%CC%88
342 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "1" graphemes - grapheme_extract starting at byte position 4 = %CC%88 == %CC%88
343 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "2" graphemes - grapheme_extract starting at byte position 0 = o%CC%88o%CC%88 == o%CC%88o%CC%88
344 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "2" graphemes - grapheme_extract starting at byte position 2 = o%CC%88o%CC%88 == o%CC%88o%CC%88
345 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "2" graphemes - grapheme_extract starting at byte position 3 = o%CC%88o%CC%88 == o%CC%88o%CC%88
346 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "2" graphemes - grapheme_extract starting at byte position 4 = %CC%88o%CC%88 == %CC%88o%CC%88
347 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "2" graphemes - grapheme_extract starting at byte position 7 = %CC%88o%CC%88 == %CC%88o%CC%88
348 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "2" graphemes - grapheme_extract starting at byte position 8 = o%CC%88 == o%CC%88
349 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "2" graphemes - grapheme_extract starting at byte position 10 = %CC%88 == %CC%88
350 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "2" graphemes - grapheme_extract starting at byte position 11 = false == false
352 function grapheme_extract($haystack, $size, $extract_type = GRAPHEME_EXTR_MAXBYTES, $start = 0)
354 extract from "abc" "3" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = abc == abc
355 extract from "abc" "2" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = ab == ab
356 extract from "abc" "1" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a == a
357 extract from "abc" "0" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES =  == 
358 extract from "a%CC%8Abc" "5" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a%CC%8Abc == a%CC%8Abc
359 extract from "a%CC%8Abc" "4" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a%CC%8Ab == a%CC%8Ab
360 extract from "a%CC%8Abc" "1" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES =  == 
361 extract from "a%CC%8Ao%CC%88o%CC%88" "9" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a%CC%8Ao%CC%88o%CC%88 == a%CC%8Ao%CC%88o%CC%88
362 extract from "a%CC%8Ao%CC%88o%CC%88" "10" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a%CC%8Ao%CC%88o%CC%88 == a%CC%8Ao%CC%88o%CC%88
363 extract from "a%CC%8Ao%CC%88o%CC%88" "11" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a%CC%8Ao%CC%88o%CC%88 == a%CC%8Ao%CC%88o%CC%88
364 extract from "a%CC%8Ao%CC%88o%CC%88" "6" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a%CC%8Ao%CC%88 == a%CC%8Ao%CC%88
365 extract from "a%CC%8Ao%CC%88c" "3" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a%CC%8A == a%CC%8A
366 extract from "a%CC%8Ao%CC%88c" "4" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a%CC%8A == a%CC%8A
367 extract from "a%CC%8Ao%CC%88c" "5" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a%CC%8A == a%CC%8A
368 extract from "a%CC%8Ao%CC%88c" "6" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a%CC%8Ao%CC%88 == a%CC%8Ao%CC%88
369 extract from "a%CC%8Ao%CC%88c" "7" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES = a%CC%8Ao%CC%88c == a%CC%8Ao%CC%88c
370 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "3" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 0 = o%CC%88 == o%CC%88
371 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "3" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 2 = o%CC%88 == o%CC%88
372 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "3" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 3 = o%CC%88 == o%CC%88
373 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "3" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 4 = %CC%88 == %CC%88
374 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "6" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 0 = o%CC%88o%CC%88 == o%CC%88o%CC%88
375 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "6" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 2 = o%CC%88o%CC%88 == o%CC%88o%CC%88
376 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "6" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 3 = o%CC%88o%CC%88 == o%CC%88o%CC%88
377 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "5" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 4 = %CC%88o%CC%88 == %CC%88o%CC%88
378 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "5" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 7 = %CC%88o%CC%88 == %CC%88o%CC%88
379 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "3" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 8 = o%CC%88 == o%CC%88
380 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "2" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 10 = %CC%88 == %CC%88
381 extract from "o%CC%88o%CC%88o%CC%88o%CC%88" "2" graphemes - grapheme_extract GRAPHEME_EXTR_MAXBYTES starting at byte position 11 = false == false
383 function grapheme_extract($haystack, $size, $extract_type = GRAPHEME_EXTR_MAXCHARS, $start = 0)
385 extract from "abc" "3" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = abc == abc
386 extract from "abc" "2" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = ab == ab
387 extract from "abc" "1" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = a == a
388 extract from "abc" "0" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS =  == 
389 extract from "abco%CC%88" "0" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS =  == 
390 extract from "abco%CC%88" "1" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = a == a
391 extract from "abco%CC%88" "2" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = ab == ab
392 extract from "abco%CC%88" "3" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = abc == abc
393 extract from "abco%CC%88" "4" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = abc == abc
394 extract from "abco%CC%88" "5" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = abco%CC%88 == abco%CC%88
395 extract from "abco%CC%88" "6" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = abco%CC%88 == abco%CC%88
396 extract from "o%CC%88abc" "0" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS =  == 
397 extract from "o%CC%88abc" "1" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS =  == 
398 extract from "o%CC%88abc" "2" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = o%CC%88 == o%CC%88
399 extract from "o%CC%88abc" "3" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = o%CC%88a == o%CC%88a
400 extract from "o%CC%88abc" "4" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = o%CC%88ab == o%CC%88ab
401 extract from "o%CC%88abca%CC%8Axyz" "5" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = o%CC%88abc == o%CC%88abc
402 extract from "o%CC%88abca%CC%8Axyz" "6" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = o%CC%88abc == o%CC%88abc
403 extract from "o%CC%88abca%CC%8Axyz" "7" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = o%CC%88abca%CC%8A == o%CC%88abca%CC%8A
404 extract from "o%CC%88abca%CC%8Axyz" "8" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS = o%CC%88abca%CC%8Ax == o%CC%88abca%CC%8Ax
405 extract from "abc" "3" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 0 = abc == abc
406 extract from "abc" "2" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 1 = bc == bc
407 extract from "abc" "1" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 2 = c == c
408 extract from "abc" "0" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 3 = false == false
409 extract from "abc" "1" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 3 = false == false
410 extract from "abc" "1" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 999 = false == false
411 extract from "o%CC%88abc" "1" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 6 = false == false
412 extract from "o%CC%88abc" "1" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 999 = false == false
413 extract from "o%CC%88abca%CC%8Axyz" "8" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 0 = o%CC%88abca%CC%8Ax == o%CC%88abca%CC%8Ax
414 extract from "o%CC%88abca%CC%8Axyz" "8" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 1 = %CC%88abca%CC%8Axy == %CC%88abca%CC%8Axy
415 extract from "o%CC%88abca%CC%8Axyz" "8" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 2 = abca%CC%8Axyz == abca%CC%8Axyz
416 extract from "o%CC%88abca%CC%8Axyz" "8" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 3 = abca%CC%8Axyz == abca%CC%8Axyz
417 extract from "o%CC%88abca%CC%8Axyz" "8" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 4 = bca%CC%8Axyz == bca%CC%8Axyz
418 extract from "o%CC%88abca%CC%8Axyz" "8" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 5 = ca%CC%8Axyz == ca%CC%8Axyz
419 extract from "o%CC%88abca%CC%8Axyz" "8" graphemes - grapheme_extract GRAPHEME_EXTR_MAXCHARS starting at byte position 6 = a%CC%8Axyz == a%CC%8Axyz