Home | History | Annotate | Download | only in mjsunit

Lines Matching full:split

29 result = "A<B>bold</B>and<CODE>coded</CODE>".split(/<(\/)?([^<>]+)>/);
33 assertArrayEquals(["a", "b"], "ab".split(/a*?/));
35 assertArrayEquals(["", "b"], "ab".split(/a*/));
37 assertArrayEquals(["a"], "ab".split(/a*?/, 1));
39 assertArrayEquals([""], "ab".split(/a*/, 1));
41 assertArrayEquals(["as","fas","fas","f"], "asdfasdfasdf".split("d"));
43 assertArrayEquals(["as","fas","fas","f"], "asdfasdfasdf".split("d", -1));
45 assertArrayEquals(["as", "fas"], "asdfasdfasdf".split("d", 2));
47 assertArrayEquals([], "asdfasdfasdf".split("d", 0));
49 assertArrayEquals(["as","fas","fas",""], "asdfasdfasd".split("d"));
51 assertArrayEquals([], "".split(""));
53 assertArrayEquals([""], "".split("a"));
55 assertArrayEquals(["a","b"], "axxb".split(/x*/));
57 assertArrayEquals(["a","b"], "axxb".split(/x+/));
59 assertArrayEquals(["a","","b"], "axxb".split(/x/));
62 assertArrayEquals(["div", "#id", ".class"], "div#id.class".split(/(?=[#.])/));
65 assertArrayEquals(["div", "#i", "d", ".class"], "div#id.class".split(/(?=[d#.])/));
67 assertArrayEquals(["a", "b", "c"], "abc".split(/(?=.)/));
70 "Wenige sind auserwählt.".split(" "));
72 assertArrayEquals([], "Wenige sind auserwählt.".split(" ", 0));
74 assertArrayEquals(["Wenige"], "Wenige sind auserwählt.".split(" ", 1));
76 assertArrayEquals(["Wenige", "sind"], "Wenige sind auserwählt.".split(" ", 2));
79 "Wenige sind auserwählt.".split(" ", 3));
82 "Wenige sind auserwählt.".split("ä"));
85 "Wenige sind auserwählt.".split("auserwählt"));
87 /* "ab".split(/((?=.))/)
97 assertArrayEquals(["a", "", "b"], "ab".split(/((?=.))/));
99 /* "ab".split(/(?=)/)
107 assertArrayEquals(["a", "b"], "ab".split(/(?=)/));
112 assertEquals([""], ''.split());
113 assertEquals([""], ''.split(/./));
114 assertEquals([], ''.split(/.?/));
115 assertEquals([], ''.split(/.??/));
116 assertEquals([], ''.split(/()()/));
126 assertEquals([], "abc".split("", 0));
127 assertEquals([], "abc".split("", numberObj(0)));
128 assertEquals(["a"], "abc".split("", 1));
129 assertEquals(["a"], "abc".split("", numberObj(1)));
130 assertEquals(["a", "b"], "abc".split("", 2));
131 assertEquals(["a", "b"], "abc".split("", numberObj(2)));
132 assertEquals(["a", "b", "c"], "abc".split("", 3));
133 assertEquals(["a", "b", "c"], "abc".split("", numberObj(3)));
134 assertEquals(["a", "b", "c"], "abc".split("", 4));
135 assertEquals(["a", "b", "c"], "abc".split("", numberObj(4)));
142 var split_chars = all_ascii_string.split("");