aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/data/text.lux
blob: 3be4f68f63d8ac2ee81547a4f8fe89856779a23d (plain)
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
(.require
 [library
  [lux (.except)
   ["$" documentation]]]
 ["[0]" /
  ["[1][0]" buffer]
  ["[1][0]" encoding]
  ["[1][0]" escape]
  ["[1][0]" regex]
  ["[1][0]" unicode]]
 ["[0]" \\format]
 [\\library
  ["[0]" /]])

(.def \\format
  (.List $.Module)
  ($.module \\format._
            ""
            [($.default \\format.functor)

             ($.default \\format.bit)
             ($.default \\format.nat)
             ($.default \\format.int)
             ($.default \\format.rev)
             ($.default \\format.frac)
             ($.default \\format.text)
             
             ($.default \\format.ratio)
             ($.default \\format.symbol)
             ($.default \\format.location)
             ($.default \\format.code)
             ($.default \\format.type)
             
             ($.default \\format.instant)
             ($.default \\format.duration)
             ($.default \\format.date)
             ($.default \\format.time)
             ($.default \\format.day)
             ($.default \\format.month)
             
             ($.default \\format.xml)
             ($.default \\format.json)

             ($.default \\format.nat_2)
             ($.default \\format.nat_8)
             ($.default \\format.nat_10)
             ($.default \\format.nat_16)
             ($.default \\format.int_2)
             ($.default \\format.int_8)
             ($.default \\format.int_10)
             ($.default \\format.int_16)
             ($.default \\format.rev_2)
             ($.default \\format.rev_8)
             ($.default \\format.rev_10)
             ($.default \\format.rev_16)
             ($.default \\format.frac_2)
             ($.default \\format.frac_8)
             ($.default \\format.frac_10)
             ($.default \\format.frac_16)
             
             ($.default \\format.mod)
             ($.default \\format.list)
             ($.default \\format.maybe)

             ($.documentation (\\format.Format it)
               "A way to produce readable text from values.")

             ($.documentation \\format.format
               "Text interpolation."
               [(format "Static part " (text static) " does not match URI: " uri)])]
            []))

(.def .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [($.default /.of_char)

             ($.default /.\0)
             ($.default /.null)
             ($.default /.\a)
             ($.default /.alarm)
             ($.default /.\b)
             ($.default /.back_space)
             ($.default /.\t)
             ($.default /.tab)
             ($.default /.\n)
             ($.default /.new_line)
             ($.default /.\v)
             ($.default /.vertical_tab)
             ($.default /.\f)
             ($.default /.form_feed)
             ($.default /.\r)
             ($.default /.carriage_return)
             ($.default /.\'')
             ($.default /.double_quote)
             
             ($.default /.size)
             ($.default /.format)
             ($.default /.equivalence)
             ($.default /.order)
             ($.default /.monoid)
             ($.default /.hash)
             ($.default /.together)
             ($.default /.empty?)
             ($.default /.space)
             ($.default /.lower_cased)
             ($.default /.upper_cased)

             ($.documentation /.Char
               "A character code number.")

             ($.documentation /.line_feed
               "Same as 'new_line'.")

             ($.documentation /.char
               "Yields the character at the specified index."
               [(char index input)])

             ($.documentation /.index_since
               ""
               [(index_since from pattern input)])

             ($.documentation /.index
               ""
               [(index pattern input)])

             ($.documentation /.last_index
               ""
               [(last_index part text)])

             ($.documentation /.starts_with?
               ""
               [(starts_with? prefix x)])

             ($.documentation /.ends_with?
               ""
               [(ends_with? postfix x)])

             ($.documentation /.enclosed_by?
               ""
               [(enclosed_by? boundary value)])

             ($.documentation /.contains?
               ""
               [(contains? sub text)])

             ($.documentation /.prefix
               ""
               [(prefix param subject)])

             ($.documentation /.suffix
               ""
               [(suffix param subject)])

             ($.documentation /.enclosed
               "Surrounds the given content text with left and right side additions."
               [(enclosed [left right] content)])

             ($.documentation /.enclosed'
               "Surrounds the given content text with the same boundary text."
               [(enclosed' boundary content)])

             ($.documentation /.clip
               "Clips a chunk of text from the input at the specified offset and of the specified size."
               [(clip offset size input)])

             ($.documentation /.clip_since
               "Clips the remaining text from the input at the specified offset."
               [(clip_since offset input)])

             ($.documentation /.split_at
               ""
               [(split_at at x)])

             ($.documentation /.split_by
               ""
               [(split_by token sample)])

             ($.documentation /.all_split_by
               ""
               [(all_split_by token sample)])

             ($.documentation /.replaced_once
               ""
               [(replaced_once pattern replacement template)])

             ($.documentation /.replaced
               ""
               [(replaced pattern replacement template)])

             ($.documentation /.interposed
               ""
               [(interposed separator texts)])

             ($.documentation /.space?
               "Checks whether the character is white-space."
               [(space? char)])]
            [..\\format
             
             /buffer.documentation
             /encoding.documentation
             /escape.documentation
             /regex.documentation
             /unicode.documentation]))