Lines Matching full:substr
25 "This test checks the boundary cases of substr()."
28 shouldBe("'bar'.substr(0)", "'bar'");
29 shouldBe("'bar'.substr(3)", "''");
30 shouldBe("'bar'.substr(4)", "''");
31 shouldBe("'bar'.substr(-1)", "'r'");
32 shouldBe("'bar'.substr(-3)", "'bar'");
33 shouldBe("'bar'.substr(-4)", "'bar'");
35 shouldBe("'bar'.substr(0, 0)", "''");
36 shouldBe("'bar'.substr(0, 1)", "'b'");
37 shouldBe("'bar'.substr(0, 3)", "'bar'");
38 shouldBe("'bar'.substr(0, 4)", "'bar'");
40 shouldBe("'bar'.substr(1, 0)", "''");
41 shouldBe("'bar'.substr(1, 1)", "'a'");
42 shouldBe("'bar'.substr(1, 2)", "'ar'");
43 shouldBe("'bar'.substr(1, 3)", "'ar'");
45 shouldBe("'bar'.substr(3, 0)", "''");
46 shouldBe("'bar'.substr(3, 1)", "''");
47 shouldBe("'bar'.substr(3, 3)", "''");
49 shouldBe("'bar'.substr(4, 0)", "''");
50 shouldBe("'bar'.substr(4, 1)", "''");
51 shouldBe("'bar'.substr(4, 3)", "''");
53 shouldBe("'bar'.substr(-1, 0)", "''");
54 shouldBe("'bar'.substr(-1, 1)", "'r'");
56 shouldBe("'bar'.substr(-3, 1)", "'b'");
57 shouldBe("'bar'.substr(-3, 3)", "'bar'");
58 shouldBe("'bar'.substr(-3, 4)", "'bar'");
60 shouldBe("'bar'.substr(-4)", "'bar'");
61 shouldBe("'bar'.substr(-4, 0)", "''");
62 shouldBe("'bar'.substr(-4, 1)", "'b'");
63 shouldBe("'bar'.substr(-4, 3)", "'bar'");
64 shouldBe("'bar'.substr(-4, 4)", "'bar'");
66 shouldBe("'GMAIL_IMP=bf-i%2Fd-0-0%2Ftl-v'.substr(10)", "'bf-i%2Fd-0-0%2Ftl-v'");