Lines Matching refs:substr

31 assertEquals(s, s.substr());
32 assertEquals(s, s.substr(0));
33 assertEquals(s, s.substr('0'));
34 assertEquals(s, s.substr(void 0));
35 assertEquals(s, s.substr(null));
36 assertEquals(s, s.substr(false));
37 assertEquals(s, s.substr(0.9));
38 assertEquals(s, s.substr({ valueOf: function() { return 0; } }));
39 assertEquals(s, s.substr({ toString: function() { return '0'; } }));
42 assertEquals(s1, s.substr(1));
43 assertEquals(s1, s.substr('1'));
44 assertEquals(s1, s.substr(true));
45 assertEquals(s1, s.substr(1.1));
46 assertEquals(s1, s.substr({ valueOf: function() { return 1; } }));
47 assertEquals(s1, s.substr({ toString: function() { return '1'; } }));
50 assertEquals(s.substring(s.length - 1), s.substr(-1));
51 assertEquals(s.substring(s.length - 1), s.substr(-1.2));
52 assertEquals(s.substring(s.length - 1), s.substr(-1.7));
53 assertEquals(s.substring(s.length - 2), s.substr(-2));
54 assertEquals(s.substring(s.length - 2), s.substr(-2.3));
55 assertEquals(s.substring(s.length - 2, s.length - 1), s.substr(-2, 1));
56 assertEquals(s, s.substr(-100));
57 assertEquals('abc', s.substr(-100, 3));
58 assertEquals(s1, s.substr(-s.length + 1));
61 assertEquals('abcdefghijklmn', s.substr(0, void 0)); // kjs and v8
62 assertEquals('', s.substr(0, null));
63 assertEquals(s, s.substr(0, String(s.length)));
64 assertEquals('a', s.substr(0, true));
168 assertEquals("cdefg", flat.substr(2, 5));
169 assertEquals("cdefg", cons.substr(2, 5));
170 assertEquals("cdefg", slice.substr(1, 5));
176 assertEquals("c\u1234def", flat.substr(2, 5));
177 assertEquals("c\u1234def", cons.substr(2, 5));
178 assertEquals("c\u1234def", slice.substr(1, 5));