about summary refs log tree commit diff stats
path: root/mu.arc.t
diff options
context:
space:
mode:
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t14
1 files changed, 14 insertions, 0 deletions
diff --git a/mu.arc.t b/mu.arc.t
index df439e13..622ea7a9 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -4357,6 +4357,20 @@
 ;? (quit) ;? 1
 
 (reset)
+(new-trace "string-split-first")
+(add-code
+  '((function main [
+      (1:string-address <- new "a/b")
+      (2:string-address 3:string-address <- split-first 1:string-address ((#\/ literal)))
+     ])))
+(run 'main)
+(each routine completed-routines*
+  (aif rep.routine!error (prn "error - " it)))
+(when (or (~memory-contains-array memory*.2 "a")
+          (~memory-contains-array memory*.3 "b"))
+  (prn "F - 'split-first' cuts string at first occurrence of delimiter"))
+
+(reset)
 (new-trace "integer-to-decimal-string")
 (add-code
   '((function main [
tik.com> 2015-03-28 20:50:23 -0700 committer Kartik K. Agaram <vc@akkartik.com> 2015-03-28 20:50:23 -0700 991' href='/akkartik/mu/commit/cpp/027space?h=main&id=75845d2b1276214ce6c3cbc3504e49cb946d29f0'>75845d2b ^
7da71d03 ^
88be3dbc ^
4b79c627 ^

b38e5819 ^
4b79c627 ^
b38e5819 ^
4b79c627 ^
69d95127 ^
b38e5819 ^
4b79c627 ^



ca01193d ^
a66c9ae6 ^
7da71d03 ^
f1b71a44 ^
7da71d03 ^




82ac0b7e ^
0487a30e ^
b38e5819 ^
4b79c627 ^
7da71d03 ^



82ac0b7e ^
7da71d03 ^
7da71d03 ^



4b79c627 ^

7da71d03 ^
7284d503 ^

88be3dbc ^
b38e5819 ^






69d95127 ^
b38e5819 ^







7284d503 ^

88be3dbc ^
b38e5819 ^







69d95127 ^
b38e5819 ^







7284d503 ^

4b79c627 ^
6673e1fc ^
0edf822f ^
8f1db754 ^

6673e1fc ^
75845d2b ^
72c4fb2d ^
6673e1fc ^
2f5f7919 ^



75845d2b ^

6673e1fc ^
7da71d03 ^

0487a30e ^
0edf822f ^
7da71d03 ^

e0584755 ^
88be3dbc ^
e0584755 ^
69d95127 ^

e0584755 ^


6673e1fc ^
e0584755 ^
6673e1fc ^
0edf822f ^
e0584755 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130