class-Text 4.32 KB
Newer Older
Camil Staps's avatar
Camil Staps committed
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
Function
-----
class Text s where

    textSize :: !s -> Int
    concat :: ![s] -> s
    split :: !s !s -> [s]
    join :: !s ![s] -> s
    indexOf :: !s !s -> Int
    lastIndexOf :: !s !s -> Int
    indexOfAfter :: !Int !s !s -> Int
    startsWith :: !s !s -> Bool
    endsWith :: !s !s -> Bool
    subString :: !Int !Int !s -> s
    replaceSubString :: !s !s !s -> s
    trim :: !s -> s
    ltrim :: !s -> s
    rtrim :: !s -> s
    lpad :: !s !Int !Char -> s
    rpad :: !s !Int !Char -> s
    toLowerCase :: !s -> s
    toUpperCase :: !s -> s
    upperCaseFirst :: !s -> s
    dropChars :: !Int !s -> s
-----
keyword	class
whitespace	 
classname	Text
whitespace	 
typevar	s
whitespace	 
keyword	where
33
whitespace	\n\n    
Camil Staps's avatar
Camil Staps committed
34 35 36 37 38 39 40
funcname	textSize
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
41
punctuation	->
Camil Staps's avatar
Camil Staps committed
42 43
whitespace	 
type	Int
44
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
45 46 47 48
funcname	concat
whitespace	 
punctuation	::
whitespace	 
49
punctuation	![
Camil Staps's avatar
Camil Staps committed
50 51 52
typevar	s
punctuation	]
whitespace	 
53
punctuation	->
Camil Staps's avatar
Camil Staps committed
54 55
whitespace	 
typevar	s
56
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
57 58 59 60 61 62 63 64 65 66
funcname	split
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
punctuation	!
typevar	s
whitespace	 
67
punctuation	->
Camil Staps's avatar
Camil Staps committed
68 69 70 71
whitespace	 
punctuation	[
typevar	s
punctuation	]
72
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
73 74 75 76 77 78 79
funcname	join
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
80
punctuation	![
Camil Staps's avatar
Camil Staps committed
81 82 83
typevar	s
punctuation	]
whitespace	 
84
punctuation	->
Camil Staps's avatar
Camil Staps committed
85 86
whitespace	 
typevar	s
87
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
88 89 90 91 92 93 94 95 96 97
funcname	indexOf
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
punctuation	!
typevar	s
whitespace	 
98
punctuation	->
Camil Staps's avatar
Camil Staps committed
99 100
whitespace	 
type	Int
101
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
102 103 104 105 106 107 108 109 110 111
funcname	lastIndexOf
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
punctuation	!
typevar	s
whitespace	 
112
punctuation	->
Camil Staps's avatar
Camil Staps committed
113 114
whitespace	 
type	Int
115
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
116 117 118 119 120 121 122 123 124 125 126 127 128
funcname	indexOfAfter
whitespace	 
punctuation	::
whitespace	 
punctuation	!
type	Int
whitespace	 
punctuation	!
typevar	s
whitespace	 
punctuation	!
typevar	s
whitespace	 
129
punctuation	->
Camil Staps's avatar
Camil Staps committed
130 131
whitespace	 
type	Int
132
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
133 134 135 136 137 138 139 140 141 142
funcname	startsWith
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
punctuation	!
typevar	s
whitespace	 
143
punctuation	->
Camil Staps's avatar
Camil Staps committed
144 145
whitespace	 
type	Bool
146
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
147 148 149 150 151 152 153 154 155 156
funcname	endsWith
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
punctuation	!
typevar	s
whitespace	 
157
punctuation	->
Camil Staps's avatar
Camil Staps committed
158 159
whitespace	 
type	Bool
160
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
161 162 163 164 165 166 167 168 169 170 171 172 173
funcname	subString
whitespace	 
punctuation	::
whitespace	 
punctuation	!
type	Int
whitespace	 
punctuation	!
type	Int
whitespace	 
punctuation	!
typevar	s
whitespace	 
174
punctuation	->
Camil Staps's avatar
Camil Staps committed
175 176
whitespace	 
typevar	s
177
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
178 179 180 181 182 183 184 185 186 187 188 189 190
funcname	replaceSubString
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
punctuation	!
typevar	s
whitespace	 
punctuation	!
typevar	s
whitespace	 
191
punctuation	->
Camil Staps's avatar
Camil Staps committed
192 193
whitespace	 
typevar	s
194
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
195 196 197 198 199 200 201
funcname	trim
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
202
punctuation	->
Camil Staps's avatar
Camil Staps committed
203 204
whitespace	 
typevar	s
205
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
206 207 208 209 210 211 212
funcname	ltrim
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
213
punctuation	->
Camil Staps's avatar
Camil Staps committed
214 215
whitespace	 
typevar	s
216
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
217 218 219 220 221 222 223
funcname	rtrim
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
224
punctuation	->
Camil Staps's avatar
Camil Staps committed
225 226
whitespace	 
typevar	s
227
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
228 229 230 231 232 233 234 235 236 237 238 239 240
funcname	lpad
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
punctuation	!
type	Int
whitespace	 
punctuation	!
type	Char
whitespace	 
241
punctuation	->
Camil Staps's avatar
Camil Staps committed
242 243
whitespace	 
typevar	s
244
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
245 246 247 248 249 250 251 252 253 254 255 256 257
funcname	rpad
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
punctuation	!
type	Int
whitespace	 
punctuation	!
type	Char
whitespace	 
258
punctuation	->
Camil Staps's avatar
Camil Staps committed
259 260
whitespace	 
typevar	s
261
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
262 263 264 265 266 267 268
funcname	toLowerCase
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
269
punctuation	->
Camil Staps's avatar
Camil Staps committed
270 271
whitespace	 
typevar	s
272
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
273 274 275 276 277 278 279
funcname	toUpperCase
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
280
punctuation	->
Camil Staps's avatar
Camil Staps committed
281 282
whitespace	 
typevar	s
283
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
284 285 286 287 288 289 290
funcname	upperCaseFirst
whitespace	 
punctuation	::
whitespace	 
punctuation	!
typevar	s
whitespace	 
291
punctuation	->
Camil Staps's avatar
Camil Staps committed
292 293
whitespace	 
typevar	s
294
whitespace	\n    
Camil Staps's avatar
Camil Staps committed
295 296 297 298 299 300 301 302 303 304
funcname	dropChars
whitespace	 
punctuation	::
whitespace	 
punctuation	!
type	Int
whitespace	 
punctuation	!
typevar	s
whitespace	 
305
punctuation	->
Camil Staps's avatar
Camil Staps committed
306 307
whitespace	 
typevar	s