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