Lines Matching refs: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(/(?=.)/));
80 assertArrayEquals(["a", "", "b"], "ab".split(/((?=.))/));
90 assertArrayEquals(["a", "b"], "ab".split(/(?=)/));
95 assertEquals([""], ''.split());
96 assertEquals([""], ''.split(/./));
97 assertEquals([], ''.split(/.?/));
98 assertEquals([], ''.split(/.??/));
99 assertEquals([], ''.split(/()()/));
109 assertEquals([], "abc".split("", 0));
110 assertEquals([], "abc".split("", numberObj(0)));
111 assertEquals(["a"], "abc".split("", 1));
112 assertEquals(["a"], "abc".split("", numberObj(1)));
113 assertEquals(["a", "b"], "abc".split("", 2));
114 assertEquals(["a", "b"], "abc".split("", numberObj(2)));
115 assertEquals(["a", "b", "c"], "abc".split("", 3));
116 assertEquals(["a", "b", "c"], "abc".split("", numberObj(3)));
117 assertEquals(["a", "b", "c"], "abc".split("", 4));
118 assertEquals(["a", "b", "c"], "abc".split("", numberObj(4)));
125 var split_chars = all_ascii_string.split("");