summary refs log tree commit diff stats
path: root/doc/subexes.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/subexes.txt')
-rw-r--r--doc/subexes.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/subexes.txt b/doc/subexes.txt
index decf30eef..54304f033 100644
--- a/doc/subexes.txt
+++ b/doc/subexes.txt
@@ -1,11 +1,11 @@
 Substitution Expressions (subex)
 ================================
 
-A *subex* (*Substitution Expression*) represents an advanted string 
+A *subex* (*Substitution Expression*) represents an advanced string
 substitution. In contrast to a `regex`:idx: which deals with string analysis, a
 *subex* deals with string synthesis.
 
-Thanks to its conditional construct ``$[0|1|2|else]`` it supports 
+Thanks to its conditional construct ``$[0|1|2|else]`` it supports
 `internationalization`:idx: of format string literals quite well.
 
 
@@ -37,7 +37,7 @@ Notation                meaning
 ``$[zero|one|def]1``    use ``X = parseInt(arg[1])`` to determine which
                         branch to use. If ``X == 0`` the 'zero' branch is
                         selected, if ``X == 1`` the 'one' branch is
-                        selected, etc. Otherwise the 'def' branch is 
+                        selected, etc. Otherwise the 'def' branch is
                         selected. ``$x`` is interpreted in branches too.
                         If a branch needs to contain ``|``, ``]`` put
                         them in single quotes. To produce a verbatim single
@@ -50,12 +50,12 @@ Examples
 .. code-block:: nim
 
   subex"$1($', '{2..})" % ["f", "a", "b", "c"] == "f(a, b, c)"
-  
+
   subex"$1 $[files|file|files]{1} copied" % ["1"] == "1 file copied"
-  
+
   subex"$['''|'|''''|']']#" % "0" == "'|"
-  
+
   subex("type\n  TEnum = enum\n    $', '40c'\n    '{..}") % [
     "fieldNameA", "fieldNameB", "fieldNameC", "fieldNameD"]
-    
+
 
;id=b59ce8d32114e6e6bd62aa8c8e3ca61fe70a6236'>b59ce8d32 ^
d90f3f59a ^
ec7aec3d5 ^

d90f3f59a ^







908b55321 ^
d90f3f59a ^




7d6cbf290 ^
d90f3f59a ^





908b55321 ^
d90f3f59a ^



7d6cbf290 ^
d90f3f59a ^


95d8558f0 ^







908b55321 ^
95d8558f0 ^

b59ce8d32 ^



















ec7aec3d5 ^
b59ce8d32 ^




50d1a4653 ^
b59ce8d32 ^
8ed3dac1d ^
b59ce8d32 ^



d90f3f59a ^
b59ce8d32 ^



ec7aec3d5 ^
















d90f3f59a ^
ec7aec3d5 ^

b59ce8d32 ^
ec7aec3d5 ^

d90f3f59a ^

95d8558f0 ^
ec7aec3d5 ^

d90f3f59a ^
ec7aec3d5 ^


d90f3f59a ^

95d8558f0 ^
ec7aec3d5 ^



d90f3f59a ^

95d8558f0 ^
d90f3f59a ^
ec7aec3d5 ^
d90f3f59a ^
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157