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