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