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