4 if (index("foobarbaz", "barbaz") != 3) {
5 printf("perl => index(\"foobarbaz\", \"barbaz\") = %d\n",
6 index("foobarbaz", "barbaz"));
7 printf(" D => index(\"foobarbaz\", \"barbaz\") = 3\n");
11 if (rindex("foobarbaz", "barbaz") != 3) {
12 printf("perl => rindex(\"foobarbaz\", \"barbaz\") = %d\n",
13 rindex("foobarbaz", "barbaz"));
14 printf(" D => rindex(\"foobarbaz\", \"barbaz\") = 3\n");
18 if (index("foofoofoo", "foo") != 0) {
19 printf("perl => index(\"foofoofoo\", \"foo\") = %d\n",
20 index("foofoofoo", "foo"));
21 printf(" D => index(\"foofoofoo\", \"foo\") = 0\n");
25 if (rindex("foofoofoo", "foo") != 6) {
26 printf("perl => rindex(\"foofoofoo\", \"foo\") = %d\n",
27 rindex("foofoofoo", "foo"));
28 printf(" D => rindex(\"foofoofoo\", \"foo\") = 6\n");
32 if (index("boofoofoo", "foo") != 3) {
33 printf("perl => index(\"boofoofoo\", \"foo\") = %d\n",
34 index("boofoofoo", "foo"));
35 printf(" D => index(\"boofoofoo\", \"foo\") = 3\n");
39 if (rindex("boofoofoo", "foo") != 6) {
40 printf("perl => rindex(\"boofoofoo\", \"foo\") = %d\n",
41 rindex("boofoofoo", "foo"));
42 printf(" D => rindex(\"boofoofoo\", \"foo\") = 6\n");
46 if (index("foobarbaz", "barbazzy") != -1) {
47 printf("perl => index(\"foobarbaz\", \"barbazzy\") = %d\n",
48 index("foobarbaz", "barbazzy"));
49 printf(" D => index(\"foobarbaz\", \"barbazzy\") = -1\n");
53 if (rindex("foobarbaz", "barbazzy") != -1) {
54 printf("perl => rindex(\"foobarbaz\", \"barbazzy\") = %d\n",
55 rindex("foobarbaz", "barbazzy"));
56 printf(" D => rindex(\"foobarbaz\", \"barbazzy\") = -1\n");
60 if (index("foobar", "foobar") != 0) {
61 printf("perl => index(\"foobar\", \"foobar\") = %d\n",
62 index("foobar", "foobar"));
63 printf(" D => index(\"foobar\", \"foobar\") = 0\n");
67 if (rindex("foobar", "foobar") != 0) {
68 printf("perl => rindex(\"foobar\", \"foobar\") = %d\n",
69 rindex("foobar", "foobar"));
70 printf(" D => rindex(\"foobar\", \"foobar\") = 0\n");
74 if (index("foobar", "foobarbaz") != -1) {
75 printf("perl => index(\"foobar\", \"foobarbaz\") = %d\n",
76 index("foobar", "foobarbaz"));
77 printf(" D => index(\"foobar\", \"foobarbaz\") = -1\n");
81 if (rindex("foobar", "foobarbaz") != -1) {
82 printf("perl => rindex(\"foobar\", \"foobarbaz\") = %d\n",
83 rindex("foobar", "foobarbaz"));
84 printf(" D => rindex(\"foobar\", \"foobarbaz\") = -1\n");
88 if (index("", "foobar") != -1) {
89 printf("perl => index(\"\", \"foobar\") = %d\n",
91 printf(" D => index(\"\", \"foobar\") = -1\n");
95 if (rindex("", "foobar") != -1) {
96 printf("perl => rindex(\"\", \"foobar\") = %d\n",
97 rindex("", "foobar"));
98 printf(" D => rindex(\"\", \"foobar\") = -1\n");
102 if (index("foobar", "") != 0) {
103 printf("perl => index(\"foobar\", \"\") = %d\n",
104 index("foobar", ""));
105 printf(" D => index(\"foobar\", \"\") = 0\n");
109 if (rindex("foobar", "") != 6) {
110 printf("perl => rindex(\"foobar\", \"\") = %d\n",
111 rindex("foobar", ""));
112 printf(" D => rindex(\"foobar\", \"\") = 6\n");
116 if (index("", "") != 0) {
117 printf("perl => index(\"\", \"\") = %d\n",
119 printf(" D => index(\"\", \"\") = 0\n");
123 if (rindex("", "") != 0) {
124 printf("perl => rindex(\"\", \"\") = %d\n",
126 printf(" D => rindex(\"\", \"\") = 0\n");
130 if (index("foo", "") != 0) {
131 printf("perl => index(\"foo\", \"\") = %d\n",
133 printf(" D => index(\"foo\", \"\") = 0\n");
137 if (rindex("foo", "") != 3) {
138 printf("perl => rindex(\"foo\", \"\") = %d\n",
140 printf(" D => rindex(\"foo\", \"\") = 3\n");
144 if (index("foobarbaz", "barbaz", -400) != 3) {
145 printf("perl => index(\"foobarbaz\", \"barbaz\", -400) = %d\n",
146 index("foobarbaz", "barbaz", -400));
147 printf(" D => index(\"foobarbaz\", \"barbaz\", -400) = 3\n");
151 if (rindex("foobarbaz", "barbaz", -400) != -1) {
152 printf("perl => rindex(\"foobarbaz\", \"barbaz\", -400) = %d\n",
153 rindex("foobarbaz", "barbaz", -400));
154 printf(" D => rindex(\"foobarbaz\", \"barbaz\", -400) = -1\n");
158 if (index("foobarbaz", "barbaz", -1) != 3) {
159 printf("perl => index(\"foobarbaz\", \"barbaz\", -1) = %d\n",
160 index("foobarbaz", "barbaz", -1));
161 printf(" D => index(\"foobarbaz\", \"barbaz\", -1) = 3\n");
165 if (rindex("foobarbaz", "barbaz", -1) != -1) {
166 printf("perl => rindex(\"foobarbaz\", \"barbaz\", -1) = %d\n",
167 rindex("foobarbaz", "barbaz", -1));
168 printf(" D => rindex(\"foobarbaz\", \"barbaz\", -1) = -1\n");
172 if (index("foobarbaz", "barbaz", 0) != 3) {
173 printf("perl => index(\"foobarbaz\", \"barbaz\", 0) = %d\n",
174 index("foobarbaz", "barbaz", 0));
175 printf(" D => index(\"foobarbaz\", \"barbaz\", 0) = 3\n");
179 if (rindex("foobarbaz", "barbaz", 0) != -1) {
180 printf("perl => rindex(\"foobarbaz\", \"barbaz\", 0) = %d\n",
181 rindex("foobarbaz", "barbaz", 0));
182 printf(" D => rindex(\"foobarbaz\", \"barbaz\", 0) = -1\n");
186 if (index("foobarbaz", "barbaz", 4) != -1) {
187 printf("perl => index(\"foobarbaz\", \"barbaz\", 4) = %d\n",
188 index("foobarbaz", "barbaz", 4));
189 printf(" D => index(\"foobarbaz\", \"barbaz\", 4) = -1\n");
193 if (rindex("foobarbaz", "barbaz", 4) != 3) {
194 printf("perl => rindex(\"foobarbaz\", \"barbaz\", 4) = %d\n",
195 rindex("foobarbaz", "barbaz", 4));
196 printf(" D => rindex(\"foobarbaz\", \"barbaz\", 4) = 3\n");
200 if (index("foobarbaz", "barbaz", 9) != -1) {
201 printf("perl => index(\"foobarbaz\", \"barbaz\", 9) = %d\n",
202 index("foobarbaz", "barbaz", 9));
203 printf(" D => index(\"foobarbaz\", \"barbaz\", 9) = -1\n");
207 if (rindex("foobarbaz", "barbaz", 9) != 3) {
208 printf("perl => rindex(\"foobarbaz\", \"barbaz\", 9) = %d\n",
209 rindex("foobarbaz", "barbaz", 9));
210 printf(" D => rindex(\"foobarbaz\", \"barbaz\", 9) = 3\n");
214 if (index("foobarbaz", "barbaz", 10) != -1) {
215 printf("perl => index(\"foobarbaz\", \"barbaz\", 10) = %d\n",
216 index("foobarbaz", "barbaz", 10));
217 printf(" D => index(\"foobarbaz\", \"barbaz\", 10) = -1\n");
221 if (rindex("foobarbaz", "barbaz", 10) != 3) {
222 printf("perl => rindex(\"foobarbaz\", \"barbaz\", 10) = %d\n",
223 rindex("foobarbaz", "barbaz", 10));
224 printf(" D => rindex(\"foobarbaz\", \"barbaz\", 10) = 3\n");
228 if (index("foobarbaz", "barbaz", 11) != -1) {
229 printf("perl => index(\"foobarbaz\", \"barbaz\", 11) = %d\n",
230 index("foobarbaz", "barbaz", 11));
231 printf(" D => index(\"foobarbaz\", \"barbaz\", 11) = -1\n");
235 if (rindex("foobarbaz", "barbaz", 11) != 3) {
236 printf("perl => rindex(\"foobarbaz\", \"barbaz\", 11) = %d\n",
237 rindex("foobarbaz", "barbaz", 11));
238 printf(" D => rindex(\"foobarbaz\", \"barbaz\", 11) = 3\n");
242 if (index("foobarbaz", "barbaz", 400) != -1) {
243 printf("perl => index(\"foobarbaz\", \"barbaz\", 400) = %d\n",
244 index("foobarbaz", "barbaz", 400));
245 printf(" D => index(\"foobarbaz\", \"barbaz\", 400) = -1\n");
249 if (rindex("foobarbaz", "barbaz", 400) != 3) {
250 printf("perl => rindex(\"foobarbaz\", \"barbaz\", 400) = %d\n",
251 rindex("foobarbaz", "barbaz", 400));
252 printf(" D => rindex(\"foobarbaz\", \"barbaz\", 400) = 3\n");
256 if (index("foofoofoo", "foo", -400) != 0) {
257 printf("perl => index(\"foofoofoo\", \"foo\", -400) = %d\n",
258 index("foofoofoo", "foo", -400));
259 printf(" D => index(\"foofoofoo\", \"foo\", -400) = 0\n");
263 if (rindex("foofoofoo", "foo", -400) != -1) {
264 printf("perl => rindex(\"foofoofoo\", \"foo\", -400) = %d\n",
265 rindex("foofoofoo", "foo", -400));
266 printf(" D => rindex(\"foofoofoo\", \"foo\", -400) = -1\n");
270 if (index("foofoofoo", "foo", -1) != 0) {
271 printf("perl => index(\"foofoofoo\", \"foo\", -1) = %d\n",
272 index("foofoofoo", "foo", -1));
273 printf(" D => index(\"foofoofoo\", \"foo\", -1) = 0\n");
277 if (rindex("foofoofoo", "foo", -1) != -1) {
278 printf("perl => rindex(\"foofoofoo\", \"foo\", -1) = %d\n",
279 rindex("foofoofoo", "foo", -1));
280 printf(" D => rindex(\"foofoofoo\", \"foo\", -1) = -1\n");
284 if (index("foofoofoo", "foo", 0) != 0) {
285 printf("perl => index(\"foofoofoo\", \"foo\", 0) = %d\n",
286 index("foofoofoo", "foo", 0));
287 printf(" D => index(\"foofoofoo\", \"foo\", 0) = 0\n");
291 if (rindex("foofoofoo", "foo", 0) != 0) {
292 printf("perl => rindex(\"foofoofoo\", \"foo\", 0) = %d\n",
293 rindex("foofoofoo", "foo", 0));
294 printf(" D => rindex(\"foofoofoo\", \"foo\", 0) = 0\n");
298 if (index("foofoofoo", "foo", 4) != 6) {
299 printf("perl => index(\"foofoofoo\", \"foo\", 4) = %d\n",
300 index("foofoofoo", "foo", 4));
301 printf(" D => index(\"foofoofoo\", \"foo\", 4) = 6\n");
305 if (rindex("foofoofoo", "foo", 4) != 3) {
306 printf("perl => rindex(\"foofoofoo\", \"foo\", 4) = %d\n",
307 rindex("foofoofoo", "foo", 4));
308 printf(" D => rindex(\"foofoofoo\", \"foo\", 4) = 3\n");
312 if (index("foofoofoo", "foo", 9) != -1) {
313 printf("perl => index(\"foofoofoo\", \"foo\", 9) = %d\n",
314 index("foofoofoo", "foo", 9));
315 printf(" D => index(\"foofoofoo\", \"foo\", 9) = -1\n");
319 if (rindex("foofoofoo", "foo", 9) != 6) {
320 printf("perl => rindex(\"foofoofoo\", \"foo\", 9) = %d\n",
321 rindex("foofoofoo", "foo", 9));
322 printf(" D => rindex(\"foofoofoo\", \"foo\", 9) = 6\n");
326 if (index("foofoofoo", "foo", 10) != -1) {
327 printf("perl => index(\"foofoofoo\", \"foo\", 10) = %d\n",
328 index("foofoofoo", "foo", 10));
329 printf(" D => index(\"foofoofoo\", \"foo\", 10) = -1\n");
333 if (rindex("foofoofoo", "foo", 10) != 6) {
334 printf("perl => rindex(\"foofoofoo\", \"foo\", 10) = %d\n",
335 rindex("foofoofoo", "foo", 10));
336 printf(" D => rindex(\"foofoofoo\", \"foo\", 10) = 6\n");
340 if (index("foofoofoo", "foo", 11) != -1) {
341 printf("perl => index(\"foofoofoo\", \"foo\", 11) = %d\n",
342 index("foofoofoo", "foo", 11));
343 printf(" D => index(\"foofoofoo\", \"foo\", 11) = -1\n");
347 if (rindex("foofoofoo", "foo", 11) != 6) {
348 printf("perl => rindex(\"foofoofoo\", \"foo\", 11) = %d\n",
349 rindex("foofoofoo", "foo", 11));
350 printf(" D => rindex(\"foofoofoo\", \"foo\", 11) = 6\n");
354 if (index("foofoofoo", "foo", 400) != -1) {
355 printf("perl => index(\"foofoofoo\", \"foo\", 400) = %d\n",
356 index("foofoofoo", "foo", 400));
357 printf(" D => index(\"foofoofoo\", \"foo\", 400) = -1\n");
361 if (rindex("foofoofoo", "foo", 400) != 6) {
362 printf("perl => rindex(\"foofoofoo\", \"foo\", 400) = %d\n",
363 rindex("foofoofoo", "foo", 400));
364 printf(" D => rindex(\"foofoofoo\", \"foo\", 400) = 6\n");
368 if (index("boofoofoo", "foo", -400) != 3) {
369 printf("perl => index(\"boofoofoo\", \"foo\", -400) = %d\n",
370 index("boofoofoo", "foo", -400));
371 printf(" D => index(\"boofoofoo\", \"foo\", -400) = 3\n");
375 if (rindex("boofoofoo", "foo", -400) != -1) {
376 printf("perl => rindex(\"boofoofoo\", \"foo\", -400) = %d\n",
377 rindex("boofoofoo", "foo", -400));
378 printf(" D => rindex(\"boofoofoo\", \"foo\", -400) = -1\n");
382 if (index("boofoofoo", "foo", -1) != 3) {
383 printf("perl => index(\"boofoofoo\", \"foo\", -1) = %d\n",
384 index("boofoofoo", "foo", -1));
385 printf(" D => index(\"boofoofoo\", \"foo\", -1) = 3\n");
389 if (rindex("boofoofoo", "foo", -1) != -1) {
390 printf("perl => rindex(\"boofoofoo\", \"foo\", -1) = %d\n",
391 rindex("boofoofoo", "foo", -1));
392 printf(" D => rindex(\"boofoofoo\", \"foo\", -1) = -1\n");
396 if (index("boofoofoo", "foo", 0) != 3) {
397 printf("perl => index(\"boofoofoo\", \"foo\", 0) = %d\n",
398 index("boofoofoo", "foo", 0));
399 printf(" D => index(\"boofoofoo\", \"foo\", 0) = 3\n");
403 if (rindex("boofoofoo", "foo", 0) != -1) {
404 printf("perl => rindex(\"boofoofoo\", \"foo\", 0) = %d\n",
405 rindex("boofoofoo", "foo", 0));
406 printf(" D => rindex(\"boofoofoo\", \"foo\", 0) = -1\n");
410 if (index("boofoofoo", "foo", 4) != 6) {
411 printf("perl => index(\"boofoofoo\", \"foo\", 4) = %d\n",
412 index("boofoofoo", "foo", 4));
413 printf(" D => index(\"boofoofoo\", \"foo\", 4) = 6\n");
417 if (rindex("boofoofoo", "foo", 4) != 3) {
418 printf("perl => rindex(\"boofoofoo\", \"foo\", 4) = %d\n",
419 rindex("boofoofoo", "foo", 4));
420 printf(" D => rindex(\"boofoofoo\", \"foo\", 4) = 3\n");
424 if (index("boofoofoo", "foo", 9) != -1) {
425 printf("perl => index(\"boofoofoo\", \"foo\", 9) = %d\n",
426 index("boofoofoo", "foo", 9));
427 printf(" D => index(\"boofoofoo\", \"foo\", 9) = -1\n");
431 if (rindex("boofoofoo", "foo", 9) != 6) {
432 printf("perl => rindex(\"boofoofoo\", \"foo\", 9) = %d\n",
433 rindex("boofoofoo", "foo", 9));
434 printf(" D => rindex(\"boofoofoo\", \"foo\", 9) = 6\n");
438 if (index("boofoofoo", "foo", 10) != -1) {
439 printf("perl => index(\"boofoofoo\", \"foo\", 10) = %d\n",
440 index("boofoofoo", "foo", 10));
441 printf(" D => index(\"boofoofoo\", \"foo\", 10) = -1\n");
445 if (rindex("boofoofoo", "foo", 10) != 6) {
446 printf("perl => rindex(\"boofoofoo\", \"foo\", 10) = %d\n",
447 rindex("boofoofoo", "foo", 10));
448 printf(" D => rindex(\"boofoofoo\", \"foo\", 10) = 6\n");
452 if (index("boofoofoo", "foo", 11) != -1) {
453 printf("perl => index(\"boofoofoo\", \"foo\", 11) = %d\n",
454 index("boofoofoo", "foo", 11));
455 printf(" D => index(\"boofoofoo\", \"foo\", 11) = -1\n");
459 if (rindex("boofoofoo", "foo", 11) != 6) {
460 printf("perl => rindex(\"boofoofoo\", \"foo\", 11) = %d\n",
461 rindex("boofoofoo", "foo", 11));
462 printf(" D => rindex(\"boofoofoo\", \"foo\", 11) = 6\n");
466 if (index("boofoofoo", "foo", 400) != -1) {
467 printf("perl => index(\"boofoofoo\", \"foo\", 400) = %d\n",
468 index("boofoofoo", "foo", 400));
469 printf(" D => index(\"boofoofoo\", \"foo\", 400) = -1\n");
473 if (rindex("boofoofoo", "foo", 400) != 6) {
474 printf("perl => rindex(\"boofoofoo\", \"foo\", 400) = %d\n",
475 rindex("boofoofoo", "foo", 400));
476 printf(" D => rindex(\"boofoofoo\", \"foo\", 400) = 6\n");
480 if (index("foobarbaz", "barbazzy", -400) != -1) {
481 printf("perl => index(\"foobarbaz\", \"barbazzy\", -400) = %d\n",
482 index("foobarbaz", "barbazzy", -400));
483 printf(" D => index(\"foobarbaz\", \"barbazzy\", -400) = -1\n");
487 if (rindex("foobarbaz", "barbazzy", -400) != -1) {
488 printf("perl => rindex(\"foobarbaz\", \"barbazzy\", -400) = %d\n",
489 rindex("foobarbaz", "barbazzy", -400));
490 printf(" D => rindex(\"foobarbaz\", \"barbazzy\", -400) = -1\n");
494 if (index("foobarbaz", "barbazzy", -1) != -1) {
495 printf("perl => index(\"foobarbaz\", \"barbazzy\", -1) = %d\n",
496 index("foobarbaz", "barbazzy", -1));
497 printf(" D => index(\"foobarbaz\", \"barbazzy\", -1) = -1\n");
501 if (rindex("foobarbaz", "barbazzy", -1) != -1) {
502 printf("perl => rindex(\"foobarbaz\", \"barbazzy\", -1) = %d\n",
503 rindex("foobarbaz", "barbazzy", -1));
504 printf(" D => rindex(\"foobarbaz\", \"barbazzy\", -1) = -1\n");
508 if (index("foobarbaz", "barbazzy", 0) != -1) {
509 printf("perl => index(\"foobarbaz\", \"barbazzy\", 0) = %d\n",
510 index("foobarbaz", "barbazzy", 0));
511 printf(" D => index(\"foobarbaz\", \"barbazzy\", 0) = -1\n");
515 if (rindex("foobarbaz", "barbazzy", 0) != -1) {
516 printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 0) = %d\n",
517 rindex("foobarbaz", "barbazzy", 0));
518 printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 0) = -1\n");
522 if (index("foobarbaz", "barbazzy", 4) != -1) {
523 printf("perl => index(\"foobarbaz\", \"barbazzy\", 4) = %d\n",
524 index("foobarbaz", "barbazzy", 4));
525 printf(" D => index(\"foobarbaz\", \"barbazzy\", 4) = -1\n");
529 if (rindex("foobarbaz", "barbazzy", 4) != -1) {
530 printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 4) = %d\n",
531 rindex("foobarbaz", "barbazzy", 4));
532 printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 4) = -1\n");
536 if (index("foobarbaz", "barbazzy", 9) != -1) {
537 printf("perl => index(\"foobarbaz\", \"barbazzy\", 9) = %d\n",
538 index("foobarbaz", "barbazzy", 9));
539 printf(" D => index(\"foobarbaz\", \"barbazzy\", 9) = -1\n");
543 if (rindex("foobarbaz", "barbazzy", 9) != -1) {
544 printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 9) = %d\n",
545 rindex("foobarbaz", "barbazzy", 9));
546 printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 9) = -1\n");
550 if (index("foobarbaz", "barbazzy", 10) != -1) {
551 printf("perl => index(\"foobarbaz\", \"barbazzy\", 10) = %d\n",
552 index("foobarbaz", "barbazzy", 10));
553 printf(" D => index(\"foobarbaz\", \"barbazzy\", 10) = -1\n");
557 if (rindex("foobarbaz", "barbazzy", 10) != -1) {
558 printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 10) = %d\n",
559 rindex("foobarbaz", "barbazzy", 10));
560 printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 10) = -1\n");
564 if (index("foobarbaz", "barbazzy", 11) != -1) {
565 printf("perl => index(\"foobarbaz\", \"barbazzy\", 11) = %d\n",
566 index("foobarbaz", "barbazzy", 11));
567 printf(" D => index(\"foobarbaz\", \"barbazzy\", 11) = -1\n");
571 if (rindex("foobarbaz", "barbazzy", 11) != -1) {
572 printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 11) = %d\n",
573 rindex("foobarbaz", "barbazzy", 11));
574 printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 11) = -1\n");
578 if (index("foobarbaz", "barbazzy", 400) != -1) {
579 printf("perl => index(\"foobarbaz\", \"barbazzy\", 400) = %d\n",
580 index("foobarbaz", "barbazzy", 400));
581 printf(" D => index(\"foobarbaz\", \"barbazzy\", 400) = -1\n");
585 if (rindex("foobarbaz", "barbazzy", 400) != -1) {
586 printf("perl => rindex(\"foobarbaz\", \"barbazzy\", 400) = %d\n",
587 rindex("foobarbaz", "barbazzy", 400));
588 printf(" D => rindex(\"foobarbaz\", \"barbazzy\", 400) = -1\n");
592 if (index("foobar", "foobar", -400) != 0) {
593 printf("perl => index(\"foobar\", \"foobar\", -400) = %d\n",
594 index("foobar", "foobar", -400));
595 printf(" D => index(\"foobar\", \"foobar\", -400) = 0\n");
599 if (rindex("foobar", "foobar", -400) != -1) {
600 printf("perl => rindex(\"foobar\", \"foobar\", -400) = %d\n",
601 rindex("foobar", "foobar", -400));
602 printf(" D => rindex(\"foobar\", \"foobar\", -400) = -1\n");
606 if (index("foobar", "foobar", -1) != 0) {
607 printf("perl => index(\"foobar\", \"foobar\", -1) = %d\n",
608 index("foobar", "foobar", -1));
609 printf(" D => index(\"foobar\", \"foobar\", -1) = 0\n");
613 if (rindex("foobar", "foobar", -1) != -1) {
614 printf("perl => rindex(\"foobar\", \"foobar\", -1) = %d\n",
615 rindex("foobar", "foobar", -1));
616 printf(" D => rindex(\"foobar\", \"foobar\", -1) = -1\n");
620 if (index("foobar", "foobar", 0) != 0) {
621 printf("perl => index(\"foobar\", \"foobar\", 0) = %d\n",
622 index("foobar", "foobar", 0));
623 printf(" D => index(\"foobar\", \"foobar\", 0) = 0\n");
627 if (rindex("foobar", "foobar", 0) != 0) {
628 printf("perl => rindex(\"foobar\", \"foobar\", 0) = %d\n",
629 rindex("foobar", "foobar", 0));
630 printf(" D => rindex(\"foobar\", \"foobar\", 0) = 0\n");
634 if (index("foobar", "foobar", 3) != -1) {
635 printf("perl => index(\"foobar\", \"foobar\", 3) = %d\n",
636 index("foobar", "foobar", 3));
637 printf(" D => index(\"foobar\", \"foobar\", 3) = -1\n");
641 if (rindex("foobar", "foobar", 3) != 0) {
642 printf("perl => rindex(\"foobar\", \"foobar\", 3) = %d\n",
643 rindex("foobar", "foobar", 3));
644 printf(" D => rindex(\"foobar\", \"foobar\", 3) = 0\n");
648 if (index("foobar", "foobar", 6) != -1) {
649 printf("perl => index(\"foobar\", \"foobar\", 6) = %d\n",
650 index("foobar", "foobar", 6));
651 printf(" D => index(\"foobar\", \"foobar\", 6) = -1\n");
655 if (rindex("foobar", "foobar", 6) != 0) {
656 printf("perl => rindex(\"foobar\", \"foobar\", 6) = %d\n",
657 rindex("foobar", "foobar", 6));
658 printf(" D => rindex(\"foobar\", \"foobar\", 6) = 0\n");
662 if (index("foobar", "foobar", 7) != -1) {
663 printf("perl => index(\"foobar\", \"foobar\", 7) = %d\n",
664 index("foobar", "foobar", 7));
665 printf(" D => index(\"foobar\", \"foobar\", 7) = -1\n");
669 if (rindex("foobar", "foobar", 7) != 0) {
670 printf("perl => rindex(\"foobar\", \"foobar\", 7) = %d\n",
671 rindex("foobar", "foobar", 7));
672 printf(" D => rindex(\"foobar\", \"foobar\", 7) = 0\n");
676 if (index("foobar", "foobar", 8) != -1) {
677 printf("perl => index(\"foobar\", \"foobar\", 8) = %d\n",
678 index("foobar", "foobar", 8));
679 printf(" D => index(\"foobar\", \"foobar\", 8) = -1\n");
683 if (rindex("foobar", "foobar", 8) != 0) {
684 printf("perl => rindex(\"foobar\", \"foobar\", 8) = %d\n",
685 rindex("foobar", "foobar", 8));
686 printf(" D => rindex(\"foobar\", \"foobar\", 8) = 0\n");
690 if (index("foobar", "foobar", 400) != -1) {
691 printf("perl => index(\"foobar\", \"foobar\", 400) = %d\n",
692 index("foobar", "foobar", 400));
693 printf(" D => index(\"foobar\", \"foobar\", 400) = -1\n");
697 if (rindex("foobar", "foobar", 400) != 0) {
698 printf("perl => rindex(\"foobar\", \"foobar\", 400) = %d\n",
699 rindex("foobar", "foobar", 400));
700 printf(" D => rindex(\"foobar\", \"foobar\", 400) = 0\n");
704 if (index("foobar", "foobarbaz", -400) != -1) {
705 printf("perl => index(\"foobar\", \"foobarbaz\", -400) = %d\n",
706 index("foobar", "foobarbaz", -400));
707 printf(" D => index(\"foobar\", \"foobarbaz\", -400) = -1\n");
711 if (rindex("foobar", "foobarbaz", -400) != -1) {
712 printf("perl => rindex(\"foobar\", \"foobarbaz\", -400) = %d\n",
713 rindex("foobar", "foobarbaz", -400));
714 printf(" D => rindex(\"foobar\", \"foobarbaz\", -400) = -1\n");
718 if (index("foobar", "foobarbaz", -1) != -1) {
719 printf("perl => index(\"foobar\", \"foobarbaz\", -1) = %d\n",
720 index("foobar", "foobarbaz", -1));
721 printf(" D => index(\"foobar\", \"foobarbaz\", -1) = -1\n");
725 if (rindex("foobar", "foobarbaz", -1) != -1) {
726 printf("perl => rindex(\"foobar\", \"foobarbaz\", -1) = %d\n",
727 rindex("foobar", "foobarbaz", -1));
728 printf(" D => rindex(\"foobar\", \"foobarbaz\", -1) = -1\n");
732 if (index("foobar", "foobarbaz", 0) != -1) {
733 printf("perl => index(\"foobar\", \"foobarbaz\", 0) = %d\n",
734 index("foobar", "foobarbaz", 0));
735 printf(" D => index(\"foobar\", \"foobarbaz\", 0) = -1\n");
739 if (rindex("foobar", "foobarbaz", 0) != -1) {
740 printf("perl => rindex(\"foobar\", \"foobarbaz\", 0) = %d\n",
741 rindex("foobar", "foobarbaz", 0));
742 printf(" D => rindex(\"foobar\", \"foobarbaz\", 0) = -1\n");
746 if (index("foobar", "foobarbaz", 3) != -1) {
747 printf("perl => index(\"foobar\", \"foobarbaz\", 3) = %d\n",
748 index("foobar", "foobarbaz", 3));
749 printf(" D => index(\"foobar\", \"foobarbaz\", 3) = -1\n");
753 if (rindex("foobar", "foobarbaz", 3) != -1) {
754 printf("perl => rindex(\"foobar\", \"foobarbaz\", 3) = %d\n",
755 rindex("foobar", "foobarbaz", 3));
756 printf(" D => rindex(\"foobar\", \"foobarbaz\", 3) = -1\n");
760 if (index("foobar", "foobarbaz", 6) != -1) {
761 printf("perl => index(\"foobar\", \"foobarbaz\", 6) = %d\n",
762 index("foobar", "foobarbaz", 6));
763 printf(" D => index(\"foobar\", \"foobarbaz\", 6) = -1\n");
767 if (rindex("foobar", "foobarbaz", 6) != -1) {
768 printf("perl => rindex(\"foobar\", \"foobarbaz\", 6) = %d\n",
769 rindex("foobar", "foobarbaz", 6));
770 printf(" D => rindex(\"foobar\", \"foobarbaz\", 6) = -1\n");
774 if (index("foobar", "foobarbaz", 7) != -1) {
775 printf("perl => index(\"foobar\", \"foobarbaz\", 7) = %d\n",
776 index("foobar", "foobarbaz", 7));
777 printf(" D => index(\"foobar\", \"foobarbaz\", 7) = -1\n");
781 if (rindex("foobar", "foobarbaz", 7) != -1) {
782 printf("perl => rindex(\"foobar\", \"foobarbaz\", 7) = %d\n",
783 rindex("foobar", "foobarbaz", 7));
784 printf(" D => rindex(\"foobar\", \"foobarbaz\", 7) = -1\n");
788 if (index("foobar", "foobarbaz", 8) != -1) {
789 printf("perl => index(\"foobar\", \"foobarbaz\", 8) = %d\n",
790 index("foobar", "foobarbaz", 8));
791 printf(" D => index(\"foobar\", \"foobarbaz\", 8) = -1\n");
795 if (rindex("foobar", "foobarbaz", 8) != -1) {
796 printf("perl => rindex(\"foobar\", \"foobarbaz\", 8) = %d\n",
797 rindex("foobar", "foobarbaz", 8));
798 printf(" D => rindex(\"foobar\", \"foobarbaz\", 8) = -1\n");
802 if (index("foobar", "foobarbaz", 400) != -1) {
803 printf("perl => index(\"foobar\", \"foobarbaz\", 400) = %d\n",
804 index("foobar", "foobarbaz", 400));
805 printf(" D => index(\"foobar\", \"foobarbaz\", 400) = -1\n");
809 if (rindex("foobar", "foobarbaz", 400) != -1) {
810 printf("perl => rindex(\"foobar\", \"foobarbaz\", 400) = %d\n",
811 rindex("foobar", "foobarbaz", 400));
812 printf(" D => rindex(\"foobar\", \"foobarbaz\", 400) = -1\n");
816 if (index("", "foobar", -400) != -1) {
817 printf("perl => index(\"\", \"foobar\", -400) = %d\n",
818 index("", "foobar", -400));
819 printf(" D => index(\"\", \"foobar\", -400) = -1\n");
823 if (rindex("", "foobar", -400) != -1) {
824 printf("perl => rindex(\"\", \"foobar\", -400) = %d\n",
825 rindex("", "foobar", -400));
826 printf(" D => rindex(\"\", \"foobar\", -400) = -1\n");
830 if (index("", "foobar", -1) != -1) {
831 printf("perl => index(\"\", \"foobar\", -1) = %d\n",
832 index("", "foobar", -1));
833 printf(" D => index(\"\", \"foobar\", -1) = -1\n");
837 if (rindex("", "foobar", -1) != -1) {
838 printf("perl => rindex(\"\", \"foobar\", -1) = %d\n",
839 rindex("", "foobar", -1));
840 printf(" D => rindex(\"\", \"foobar\", -1) = -1\n");
844 if (index("", "foobar", 0) != -1) {
845 printf("perl => index(\"\", \"foobar\", 0) = %d\n",
846 index("", "foobar", 0));
847 printf(" D => index(\"\", \"foobar\", 0) = -1\n");
851 if (rindex("", "foobar", 0) != -1) {
852 printf("perl => rindex(\"\", \"foobar\", 0) = %d\n",
853 rindex("", "foobar", 0));
854 printf(" D => rindex(\"\", \"foobar\", 0) = -1\n");
858 if (index("", "foobar", 0) != -1) {
859 printf("perl => index(\"\", \"foobar\", 0) = %d\n",
860 index("", "foobar", 0));
861 printf(" D => index(\"\", \"foobar\", 0) = -1\n");
865 if (rindex("", "foobar", 0) != -1) {
866 printf("perl => rindex(\"\", \"foobar\", 0) = %d\n",
867 rindex("", "foobar", 0));
868 printf(" D => rindex(\"\", \"foobar\", 0) = -1\n");
872 if (index("", "foobar", 0) != -1) {
873 printf("perl => index(\"\", \"foobar\", 0) = %d\n",
874 index("", "foobar", 0));
875 printf(" D => index(\"\", \"foobar\", 0) = -1\n");
879 if (rindex("", "foobar", 0) != -1) {
880 printf("perl => rindex(\"\", \"foobar\", 0) = %d\n",
881 rindex("", "foobar", 0));
882 printf(" D => rindex(\"\", \"foobar\", 0) = -1\n");
886 if (index("", "foobar", 1) != -1) {
887 printf("perl => index(\"\", \"foobar\", 1) = %d\n",
888 index("", "foobar", 1));
889 printf(" D => index(\"\", \"foobar\", 1) = -1\n");
893 if (rindex("", "foobar", 1) != -1) {
894 printf("perl => rindex(\"\", \"foobar\", 1) = %d\n",
895 rindex("", "foobar", 1));
896 printf(" D => rindex(\"\", \"foobar\", 1) = -1\n");
900 if (index("", "foobar", 2) != -1) {
901 printf("perl => index(\"\", \"foobar\", 2) = %d\n",
902 index("", "foobar", 2));
903 printf(" D => index(\"\", \"foobar\", 2) = -1\n");
907 if (rindex("", "foobar", 2) != -1) {
908 printf("perl => rindex(\"\", \"foobar\", 2) = %d\n",
909 rindex("", "foobar", 2));
910 printf(" D => rindex(\"\", \"foobar\", 2) = -1\n");
914 if (index("", "foobar", 400) != -1) {
915 printf("perl => index(\"\", \"foobar\", 400) = %d\n",
916 index("", "foobar", 400));
917 printf(" D => index(\"\", \"foobar\", 400) = -1\n");
921 if (rindex("", "foobar", 400) != -1) {
922 printf("perl => rindex(\"\", \"foobar\", 400) = %d\n",
923 rindex("", "foobar", 400));
924 printf(" D => rindex(\"\", \"foobar\", 400) = -1\n");
928 if (index("foobar", "", -400) != 0) {
929 printf("perl => index(\"foobar\", \"\", -400) = %d\n",
930 index("foobar", "", -400));
931 printf(" D => index(\"foobar\", \"\", -400) = 0\n");
935 if (rindex("foobar", "", -400) != 0) {
936 printf("perl => rindex(\"foobar\", \"\", -400) = %d\n",
937 rindex("foobar", "", -400));
938 printf(" D => rindex(\"foobar\", \"\", -400) = 0\n");
942 if (index("foobar", "", -1) != 0) {
943 printf("perl => index(\"foobar\", \"\", -1) = %d\n",
944 index("foobar", "", -1));
945 printf(" D => index(\"foobar\", \"\", -1) = 0\n");
949 if (rindex("foobar", "", -1) != 0) {
950 printf("perl => rindex(\"foobar\", \"\", -1) = %d\n",
951 rindex("foobar", "", -1));
952 printf(" D => rindex(\"foobar\", \"\", -1) = 0\n");
956 if (index("foobar", "", 0) != 0) {
957 printf("perl => index(\"foobar\", \"\", 0) = %d\n",
958 index("foobar", "", 0));
959 printf(" D => index(\"foobar\", \"\", 0) = 0\n");
963 if (rindex("foobar", "", 0) != 0) {
964 printf("perl => rindex(\"foobar\", \"\", 0) = %d\n",
965 rindex("foobar", "", 0));
966 printf(" D => rindex(\"foobar\", \"\", 0) = 0\n");
970 if (index("foobar", "", 3) != 3) {
971 printf("perl => index(\"foobar\", \"\", 3) = %d\n",
972 index("foobar", "", 3));
973 printf(" D => index(\"foobar\", \"\", 3) = 3\n");
977 if (rindex("foobar", "", 3) != 3) {
978 printf("perl => rindex(\"foobar\", \"\", 3) = %d\n",
979 rindex("foobar", "", 3));
980 printf(" D => rindex(\"foobar\", \"\", 3) = 3\n");
984 if (index("foobar", "", 6) != 6) {
985 printf("perl => index(\"foobar\", \"\", 6) = %d\n",
986 index("foobar", "", 6));
987 printf(" D => index(\"foobar\", \"\", 6) = 6\n");
991 if (rindex("foobar", "", 6) != 6) {
992 printf("perl => rindex(\"foobar\", \"\", 6) = %d\n",
993 rindex("foobar", "", 6));
994 printf(" D => rindex(\"foobar\", \"\", 6) = 6\n");
998 if (index("foobar", "", 7) != 6) {
999 printf("perl => index(\"foobar\", \"\", 7) = %d\n",
1000 index("foobar", "", 7));
1001 printf(" D => index(\"foobar\", \"\", 7) = 6\n");
1005 if (rindex("foobar", "", 7) != 6) {
1006 printf("perl => rindex(\"foobar\", \"\", 7) = %d\n",
1007 rindex("foobar", "", 7));
1008 printf(" D => rindex(\"foobar\", \"\", 7) = 6\n");
1012 if (index("foobar", "", 8) != 6) {
1013 printf("perl => index(\"foobar\", \"\", 8) = %d\n",
1014 index("foobar", "", 8));
1015 printf(" D => index(\"foobar\", \"\", 8) = 6\n");
1019 if (rindex("foobar", "", 8) != 6) {
1020 printf("perl => rindex(\"foobar\", \"\", 8) = %d\n",
1021 rindex("foobar", "", 8));
1022 printf(" D => rindex(\"foobar\", \"\", 8) = 6\n");
1026 if (index("foobar", "", 400) != 6) {
1027 printf("perl => index(\"foobar\", \"\", 400) = %d\n",
1028 index("foobar", "", 400));
1029 printf(" D => index(\"foobar\", \"\", 400) = 6\n");
1033 if (rindex("foobar", "", 400) != 6) {
1034 printf("perl => rindex(\"foobar\", \"\", 400) = %d\n",
1035 rindex("foobar", "", 400));
1036 printf(" D => rindex(\"foobar\", \"\", 400) = 6\n");
1040 if (index("", "", -400) != 0) {
1041 printf("perl => index(\"\", \"\", -400) = %d\n",
1042 index("", "", -400));
1043 printf(" D => index(\"\", \"\", -400) = 0\n");
1047 if (rindex("", "", -400) != 0) {
1048 printf("perl => rindex(\"\", \"\", -400) = %d\n",
1049 rindex("", "", -400));
1050 printf(" D => rindex(\"\", \"\", -400) = 0\n");
1054 if (index("", "", -1) != 0) {
1055 printf("perl => index(\"\", \"\", -1) = %d\n",
1057 printf(" D => index(\"\", \"\", -1) = 0\n");
1061 if (rindex("", "", -1) != 0) {
1062 printf("perl => rindex(\"\", \"\", -1) = %d\n",
1063 rindex("", "", -1));
1064 printf(" D => rindex(\"\", \"\", -1) = 0\n");
1068 if (index("", "", 0) != 0) {
1069 printf("perl => index(\"\", \"\", 0) = %d\n",
1071 printf(" D => index(\"\", \"\", 0) = 0\n");
1075 if (rindex("", "", 0) != 0) {
1076 printf("perl => rindex(\"\", \"\", 0) = %d\n",
1078 printf(" D => rindex(\"\", \"\", 0) = 0\n");
1082 if (index("", "", 0) != 0) {
1083 printf("perl => index(\"\", \"\", 0) = %d\n",
1085 printf(" D => index(\"\", \"\", 0) = 0\n");
1089 if (rindex("", "", 0) != 0) {
1090 printf("perl => rindex(\"\", \"\", 0) = %d\n",
1092 printf(" D => rindex(\"\", \"\", 0) = 0\n");
1096 if (index("", "", 0) != 0) {
1097 printf("perl => index(\"\", \"\", 0) = %d\n",
1099 printf(" D => index(\"\", \"\", 0) = 0\n");
1103 if (rindex("", "", 0) != 0) {
1104 printf("perl => rindex(\"\", \"\", 0) = %d\n",
1106 printf(" D => rindex(\"\", \"\", 0) = 0\n");
1110 if (index("", "", 1) != 0) {
1111 printf("perl => index(\"\", \"\", 1) = %d\n",
1113 printf(" D => index(\"\", \"\", 1) = 0\n");
1117 if (rindex("", "", 1) != 0) {
1118 printf("perl => rindex(\"\", \"\", 1) = %d\n",
1120 printf(" D => rindex(\"\", \"\", 1) = 0\n");