root/trunk/tests/str.md

Revision 243, 0.9 kB (checked in by JarrettBillingsley, 1 year ago)

--

Line 
1 // NOTE TO SELF: This does not run successfully with -cov enabled in the host.  Causes a Heisenbug.
2 module tests.str;
3
4 "123".toInt();
5 "123".toInt(8);
6 "123".toFloat();
7 "a".compare("b");
8 "a".icompare("b");
9 "a".find("a");
10 "a".find('a');
11 "a".find('b');
12 "a".ifind('b');
13 "a".rfind('b');
14 "a".irfind('b');
15 try "a".find(4); catch(e){}
16 "a".ifind("a");
17 "a".ifind('a');
18 try "a".ifind(4); catch(e){}
19 "a".rfind("a");
20 "a".rfind('a');
21 try "a".rfind(4); catch(e){}
22 "a".irfind("a");
23 "a".irfind('a');
24 try "a".irfind(4); catch(e){}
25 "a".toLower();
26 "A".toLower();
27 "a".toUpper();
28 "A".toUpper();
29 "a".repeat(0);
30 try "a".repeat(-1); catch(e){}
31 string.join(["a", "b"], ",");
32 try string.join([1], ","); catch(e){}
33 "a".split();
34 "a".split("a");
35 "a".splitLines();
36 "a".strip();
37 "a".lstrip();
38 "a".rstrip();
39 "a".replace("a", "b");
40 foreach(v; "a"){}
41 foreach(v; "a", "reverse"){}
Note: See TracBrowser for help on using the browser.