release 0.5.4
[swfdec.git] / test / trace / string-split.as
blob97f266a6ee4519df7308506354793e524a3ed23e
1 // makeswf -v 7 -s 200x150 -r 1 -o string-split.swf string-split.as
3 trace ("Check String.split()");
5 #include "values.as"
7 s = new String ("aaaa");
8 trace (s.split ("a"));
9 trace (s.split ("a", 3));
10 trace (s.split ("a", -2));
12 s = names.toString ();
13 for (i = 0; i < values.length; i++) {
14 trace (">>> split (\"" + names[i] + "'\")");
15 a = s.split (names[i]);
16 trace (a.length);
17 for (j = 0; j < a.length; j++)
18 trace (a[j]);
19 l = a.length + 1;
20 if (l > 8)
21 l = 10;
22 for (j = -1; j < l; j++) {
23 trace (">>> split (\"" + names[i] + "\", " + j + ")");
24 trace (s.split (names[i], j));
26 trace (">>> split (" + names[i] + ")");
27 a = s.split (String (values[i]));
28 for (j = 0; j < a.length; j++)
29 trace (a[j]);
30 trace (a.length);
31 l = a.length + 1;
32 if (l > 8)
33 l = 10;
34 for (j = -1; j < l; j++) {
35 trace (">>> split (" + names[i] + ", " + j + ")");
36 trace (s.split (values[i], j));
40 loadMovie ("FSCommand:quit", "");