54079fbada00d47033afc84cc861c0820239ac54
[roojs1] / docs / symbols / Roo.util.Format.json
1 {
2   "name" : "Roo.util.Format",
3   "augments" : [
4   ],
5   "desc" : "Reusable data formatting functions",
6   "isSingleton" : true,
7   "isStatic" : false,
8   "isBuiltin" : false,
9   "memberOf" : "Format",
10   "example" : "",
11   "deprecated" : "",
12   "since" : "",
13   "see" : "",
14   "params" : [
15   ],
16   "returns" : [
17   ],
18   "config" : [
19   ],
20   "methods" : [
21     {
22       "name" : "uppercase",
23       "desc" : "Converts a string to all upper case letters",
24       "isStatic" : false,
25       "isConstructor" : false,
26       "isPrivate" : false,
27       "memberOf" : "Roo.util.Format",
28       "example" : "",
29       "deprecated" : "",
30       "since" : "",
31       "see" : "",
32       "params" : [
33         {
34           "name" : "value",
35           "type" : "String",
36           "desc" : "The text to convert",
37           "isOptional" : false
38         }
39       ],
40       "returns" : [
41         {
42           "name" : "",
43           "type" : "String",
44           "desc" : "The converted text"
45         }
46       ]
47     },
48     {
49       "name" : "date",
50       "desc" : "Parse a value into a formatted date using the specified format pattern.",
51       "isStatic" : false,
52       "isConstructor" : false,
53       "isPrivate" : false,
54       "memberOf" : "Roo.util.Format",
55       "example" : "",
56       "deprecated" : "",
57       "since" : "",
58       "see" : "",
59       "params" : [
60         {
61           "name" : "value",
62           "type" : "Mixed",
63           "desc" : "The value to format",
64           "isOptional" : false
65         },
66         {
67           "name" : "format",
68           "type" : "String",
69           "desc" : "(optional) Any valid date format string (defaults to 'm/d/Y')",
70           "isOptional" : false
71         }
72       ],
73       "returns" : [
74         {
75           "name" : "",
76           "type" : "String",
77           "desc" : "The formatted date string"
78         }
79       ]
80     },
81     {
82       "name" : "lowercase",
83       "desc" : "Converts a string to all lower case letters",
84       "isStatic" : false,
85       "isConstructor" : false,
86       "isPrivate" : false,
87       "memberOf" : "Roo.util.Format",
88       "example" : "",
89       "deprecated" : "",
90       "since" : "",
91       "see" : "",
92       "params" : [
93         {
94           "name" : "value",
95           "type" : "String",
96           "desc" : "The text to convert",
97           "isOptional" : false
98         }
99       ],
100       "returns" : [
101         {
102           "name" : "",
103           "type" : "String",
104           "desc" : "The converted text"
105         }
106       ]
107     },
108     {
109       "name" : "undef",
110       "desc" : "Checks a reference and converts it to empty string if it is undefined",
111       "isStatic" : false,
112       "isConstructor" : false,
113       "isPrivate" : false,
114       "memberOf" : "Roo.util.Format",
115       "example" : "",
116       "deprecated" : "",
117       "since" : "",
118       "see" : "",
119       "params" : [
120         {
121           "name" : "value",
122           "type" : "Mixed",
123           "desc" : "Reference to check",
124           "isOptional" : false
125         }
126       ],
127       "returns" : [
128         {
129           "name" : "",
130           "type" : "Mixed",
131           "desc" : "Empty string if converted, otherwise the original value"
132         }
133       ]
134     },
135     {
136       "name" : "stripTags",
137       "desc" : "Strips all HTML tags",
138       "isStatic" : false,
139       "isConstructor" : false,
140       "isPrivate" : false,
141       "memberOf" : "Roo.util.Format",
142       "example" : "",
143       "deprecated" : "",
144       "since" : "",
145       "see" : "",
146       "params" : [
147         {
148           "name" : "value",
149           "type" : "Mixed",
150           "desc" : "The text from which to strip tags",
151           "isOptional" : false
152         }
153       ],
154       "returns" : [
155         {
156           "name" : "",
157           "type" : "String",
158           "desc" : "The stripped text"
159         }
160       ]
161     },
162     {
163       "name" : "ellipsis",
164       "desc" : "Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length",
165       "isStatic" : false,
166       "isConstructor" : false,
167       "isPrivate" : false,
168       "memberOf" : "Roo.util.Format",
169       "example" : "",
170       "deprecated" : "",
171       "since" : "",
172       "see" : "",
173       "params" : [
174         {
175           "name" : "value",
176           "type" : "String",
177           "desc" : "The string to truncate",
178           "isOptional" : false
179         },
180         {
181           "name" : "length",
182           "type" : "Number",
183           "desc" : "The maximum length to allow before truncating",
184           "isOptional" : false
185         }
186       ],
187       "returns" : [
188         {
189           "name" : "",
190           "type" : "String",
191           "desc" : "The converted text"
192         }
193       ]
194     },
195     {
196       "name" : "htmlDecode",
197       "desc" : "Convert certain characters (&, <, >, and ') from their HTML character equivalents.",
198       "isStatic" : false,
199       "isConstructor" : false,
200       "isPrivate" : false,
201       "memberOf" : "Roo.util.Format",
202       "example" : "",
203       "deprecated" : "",
204       "since" : "",
205       "see" : "",
206       "params" : [
207         {
208           "name" : "value",
209           "type" : "String",
210           "desc" : "The string to decode",
211           "isOptional" : false
212         }
213       ],
214       "returns" : [
215         {
216           "name" : "",
217           "type" : "String",
218           "desc" : "The decoded text"
219         }
220       ]
221     },
222     {
223       "name" : "htmlEncode",
224       "desc" : "Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.",
225       "isStatic" : false,
226       "isConstructor" : false,
227       "isPrivate" : false,
228       "memberOf" : "Roo.util.Format",
229       "example" : "",
230       "deprecated" : "",
231       "since" : "",
232       "see" : "",
233       "params" : [
234         {
235           "name" : "value",
236           "type" : "String",
237           "desc" : "The string to encode",
238           "isOptional" : false
239         }
240       ],
241       "returns" : [
242         {
243           "name" : "",
244           "type" : "String",
245           "desc" : "The encoded text"
246         }
247       ]
248     },
249     {
250       "name" : "toFixed",
251       "desc" : "safer version of Math.toFixed..??/",
252       "isStatic" : false,
253       "isConstructor" : false,
254       "isPrivate" : false,
255       "memberOf" : "Roo.util.Format",
256       "example" : "",
257       "deprecated" : "",
258       "since" : "",
259       "see" : "",
260       "params" : [
261         {
262           "name" : "value",
263           "type" : "Number/String",
264           "desc" : "The numeric value to format",
265           "isOptional" : false
266         },
267         {
268           "name" : "value",
269           "type" : "Number/String",
270           "desc" : "Decimal places",
271           "isOptional" : false
272         }
273       ],
274       "returns" : [
275         {
276           "name" : "",
277           "type" : "String",
278           "desc" : "The formatted currency string"
279         }
280       ]
281     },
282     {
283       "name" : "substr",
284       "desc" : "Returns a substring from within an original string",
285       "isStatic" : false,
286       "isConstructor" : false,
287       "isPrivate" : false,
288       "memberOf" : "Roo.util.Format",
289       "example" : "",
290       "deprecated" : "",
291       "since" : "",
292       "see" : "",
293       "params" : [
294         {
295           "name" : "value",
296           "type" : "String",
297           "desc" : "The original text",
298           "isOptional" : false
299         },
300         {
301           "name" : "start",
302           "type" : "Number",
303           "desc" : "The start index of the substring",
304           "isOptional" : false
305         },
306         {
307           "name" : "length",
308           "type" : "Number",
309           "desc" : "The length of the substring",
310           "isOptional" : false
311         }
312       ],
313       "returns" : [
314         {
315           "name" : "",
316           "type" : "String",
317           "desc" : "The substring"
318         }
319       ]
320     },
321     {
322       "name" : "number",
323       "desc" : "Format a number\neventually this should probably emulate php's number_format",
324       "isStatic" : false,
325       "isConstructor" : false,
326       "isPrivate" : false,
327       "memberOf" : "Roo.util.Format",
328       "example" : "",
329       "deprecated" : "",
330       "since" : "",
331       "see" : "",
332       "params" : [
333         {
334           "name" : "value",
335           "type" : "Number/String",
336           "desc" : "The numeric value to format",
337           "isOptional" : false
338         },
339         {
340           "name" : "decimals",
341           "type" : "Number",
342           "desc" : "number of decimal places",
343           "isOptional" : false
344         },
345         {
346           "name" : "delimiter",
347           "type" : "String",
348           "desc" : "for thousands (default comma)",
349           "isOptional" : false
350         }
351       ],
352       "returns" : [
353         {
354           "name" : "",
355           "type" : "String",
356           "desc" : "The formatted currency string"
357         }
358       ]
359     },
360     {
361       "name" : "usMoney",
362       "desc" : "Format a number as US currency",
363       "isStatic" : false,
364       "isConstructor" : false,
365       "isPrivate" : false,
366       "memberOf" : "Roo.util.Format",
367       "example" : "",
368       "deprecated" : "",
369       "since" : "",
370       "see" : "",
371       "params" : [
372         {
373           "name" : "value",
374           "type" : "Number/String",
375           "desc" : "The numeric value to format",
376           "isOptional" : false
377         }
378       ],
379       "returns" : [
380         {
381           "name" : "",
382           "type" : "String",
383           "desc" : "The formatted currency string"
384         }
385       ]
386     },
387     {
388       "name" : "capitalize",
389       "desc" : "Converts the first character only of a string to upper case",
390       "isStatic" : false,
391       "isConstructor" : false,
392       "isPrivate" : false,
393       "memberOf" : "Roo.util.Format",
394       "example" : "",
395       "deprecated" : "",
396       "since" : "",
397       "see" : "",
398       "params" : [
399         {
400           "name" : "value",
401           "type" : "String",
402           "desc" : "The text to convert",
403           "isOptional" : false
404         }
405       ],
406       "returns" : [
407         {
408           "name" : "",
409           "type" : "String",
410           "desc" : "The converted text"
411         }
412       ]
413     },
414     {
415       "name" : "trim",
416       "desc" : "Trims any whitespace from either side of a string",
417       "isStatic" : false,
418       "isConstructor" : false,
419       "isPrivate" : false,
420       "memberOf" : "Roo.util.Format",
421       "example" : "",
422       "deprecated" : "",
423       "since" : "",
424       "see" : "",
425       "params" : [
426         {
427           "name" : "value",
428           "type" : "String",
429           "desc" : "The text to trim",
430           "isOptional" : false
431         }
432       ],
433       "returns" : [
434         {
435           "name" : "",
436           "type" : "String",
437           "desc" : "The trimmed text"
438         }
439       ]
440     },
441     {
442       "name" : "dateRenderer",
443       "desc" : "Returns a date rendering function that can be reused to apply a date format multiple times efficiently",
444       "isStatic" : false,
445       "isConstructor" : false,
446       "isPrivate" : false,
447       "memberOf" : "Roo.util.Format",
448       "example" : "",
449       "deprecated" : "",
450       "since" : "",
451       "see" : "",
452       "params" : [
453         {
454           "name" : "format",
455           "type" : "String",
456           "desc" : "Any valid date format string",
457           "isOptional" : false
458         }
459       ],
460       "returns" : [
461         {
462           "name" : "",
463           "type" : "Function",
464           "desc" : "The date formatting function"
465         }
466       ]
467     }
468   ],
469   "events" : [
470   ]
471 }