Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / output / Ext.String.js
1 Ext.data.JsonP.Ext_String({
2   "allMixins": [
3
4   ],
5   "deprecated": null,
6   "docauthor": null,
7   "members": {
8     "cfg": [
9
10     ],
11     "method": [
12       {
13         "deprecated": null,
14         "alias": null,
15         "protected": false,
16         "tagname": "method",
17         "href": "String.html#Ext-String-method-capitalize",
18         "shortDoc": "Capitalize the given string ...",
19         "static": false,
20         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
21         "private": false,
22         "params": [
23           {
24             "type": "String",
25             "optional": false,
26             "doc": "\n",
27             "name": "string"
28           }
29         ],
30         "name": "capitalize",
31         "owner": "Ext.String",
32         "doc": "<p>Capitalize the given string</p>\n",
33         "linenr": 101,
34         "return": {
35           "type": "String",
36           "doc": "\n"
37         },
38         "html_filename": "String.html"
39       },
40       {
41         "deprecated": null,
42         "alias": null,
43         "protected": false,
44         "tagname": "method",
45         "href": "String.html#Ext-String-method-ellipsis",
46         "shortDoc": "Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length ...",
47         "static": false,
48         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
49         "private": false,
50         "params": [
51           {
52             "type": "String",
53             "optional": false,
54             "doc": "<p>The string to truncate</p>\n",
55             "name": "value"
56           },
57           {
58             "type": "Number",
59             "optional": false,
60             "doc": "<p>The maximum length to allow before truncating</p>\n",
61             "name": "length"
62           },
63           {
64             "type": "Boolean",
65             "optional": false,
66             "doc": "<p>True to try to find a common word break</p>\n",
67             "name": "word"
68           }
69         ],
70         "name": "ellipsis",
71         "owner": "Ext.String",
72         "doc": "<p>Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length</p>\n",
73         "linenr": 110,
74         "return": {
75           "type": "String",
76           "doc": "<p>The converted text</p>\n"
77         },
78         "html_filename": "String.html"
79       },
80       {
81         "deprecated": null,
82         "alias": null,
83         "protected": false,
84         "tagname": "method",
85         "href": "String.html#Ext-String-method-escape",
86         "shortDoc": "Escapes the passed string for ' and \\ ...",
87         "static": false,
88         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
89         "private": false,
90         "params": [
91           {
92             "type": "String",
93             "optional": false,
94             "doc": "<p>The string to escape</p>\n",
95             "name": "string"
96           }
97         ],
98         "name": "escape",
99         "owner": "Ext.String",
100         "doc": "<p>Escapes the passed string for ' and \\</p>\n",
101         "linenr": 140,
102         "return": {
103           "type": "String",
104           "doc": "<p>The escaped string</p>\n"
105         },
106         "html_filename": "String.html"
107       },
108       {
109         "deprecated": null,
110         "alias": null,
111         "protected": false,
112         "tagname": "method",
113         "href": "String.html#Ext-String-method-escapeRegex",
114         "shortDoc": "Escapes the passed string for use in a regular expression ...",
115         "static": false,
116         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
117         "private": false,
118         "params": [
119           {
120             "type": "String",
121             "optional": false,
122             "doc": "\n",
123             "name": "string"
124           }
125         ],
126         "name": "escapeRegex",
127         "owner": "Ext.String",
128         "doc": "<p>Escapes the passed string for use in a regular expression</p>\n",
129         "linenr": 131,
130         "return": {
131           "type": "String",
132           "doc": "\n"
133         },
134         "html_filename": "String.html"
135       },
136       {
137         "deprecated": null,
138         "alias": null,
139         "protected": false,
140         "tagname": "method",
141         "href": "String.html#Ext-String-method-format",
142         "shortDoc": "Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. ...",
143         "static": false,
144         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
145         "private": false,
146         "params": [
147           {
148             "type": "String",
149             "optional": false,
150             "doc": "<p>The tokenized string to be formatted</p>\n",
151             "name": "string"
152           },
153           {
154             "type": "String",
155             "optional": false,
156             "doc": "<p>The value to replace token {0}</p>\n",
157             "name": "value1"
158           },
159           {
160             "type": "String",
161             "optional": false,
162             "doc": "<p>Etc...</p>\n",
163             "name": "value2"
164           }
165         ],
166         "name": "format",
167         "owner": "Ext.String",
168         "doc": "<p>Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.  Each\ntoken must be unique, and must increment in the format {0}, {1}, etc.  Example usage:</p>\n\n<pre><code>var cls = 'my-class', text = 'Some text';\nvar s = Ext.String.format('&lt;div class=\"{0}\">{1}&lt;/div>', cls, text);\n// s now contains the string: '&lt;div class=\"my-class\">Some text&lt;/div>'\n       </code></pre>\n\n",
169         "linenr": 192,
170         "return": {
171           "type": "String",
172           "doc": "<p>The formatted string</p>\n"
173         },
174         "html_filename": "String.html"
175       },
176       {
177         "deprecated": null,
178         "alias": null,
179         "protected": false,
180         "tagname": "method",
181         "href": "String.html#Ext-String-method-htmlDecode",
182         "shortDoc": "Convert certain characters (&amp;, &lt;, >, and ') from their HTML character equivalents. ...",
183         "static": false,
184         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
185         "private": false,
186         "params": [
187           {
188             "type": "String",
189             "optional": false,
190             "doc": "<p>The string to decode</p>\n",
191             "name": "value"
192           }
193         ],
194         "name": "htmlDecode",
195         "owner": "Ext.String",
196         "doc": "<p>Convert certain characters (&amp;, &lt;, >, and ') from their HTML character equivalents.</p>\n",
197         "linenr": 41,
198         "return": {
199           "type": "String",
200           "doc": "<p>The decoded text</p>\n"
201         },
202         "html_filename": "String.html"
203       },
204       {
205         "deprecated": null,
206         "alias": null,
207         "protected": false,
208         "tagname": "method",
209         "href": "String.html#Ext-String-method-htmlEncode",
210         "shortDoc": "Convert certain characters (&amp;, &lt;, >, and ') to their HTML character equivalents for literal display in web pages. ...",
211         "static": false,
212         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
213         "private": false,
214         "params": [
215           {
216             "type": "String",
217             "optional": false,
218             "doc": "<p>The string to encode</p>\n",
219             "name": "value"
220           }
221         ],
222         "name": "htmlEncode",
223         "owner": "Ext.String",
224         "doc": "<p>Convert certain characters (&amp;, &lt;, >, and ') to their HTML character equivalents for literal display in web pages.</p>\n",
225         "linenr": 14,
226         "return": {
227           "type": "String",
228           "doc": "<p>The encoded text</p>\n"
229         },
230         "html_filename": "String.html"
231       },
232       {
233         "deprecated": null,
234         "alias": null,
235         "protected": false,
236         "tagname": "method",
237         "href": "String.html#Ext-String-method-leftPad",
238         "shortDoc": "Pads the left side of a string with a specified character. ...",
239         "static": false,
240         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
241         "private": false,
242         "params": [
243           {
244             "type": "String",
245             "optional": false,
246             "doc": "<p>The original string</p>\n",
247             "name": "string"
248           },
249           {
250             "type": "Number",
251             "optional": false,
252             "doc": "<p>The total length of the output string</p>\n",
253             "name": "size"
254           },
255           {
256             "type": "String",
257             "optional": true,
258             "doc": "<p>(optional) The character with which to pad the original string (defaults to empty string \" \")</p>\n",
259             "name": "character"
260           }
261         ],
262         "name": "leftPad",
263         "owner": "Ext.String",
264         "doc": "<p>Pads the left side of a string with a specified character.  This is especially useful\nfor normalizing number and date strings.  Example usage:</p>\n\n<pre><code>var s = Ext.String.leftPad('123', 5, '0');\n// s now contains the string: '00123'\n       </code></pre>\n\n",
265         "linenr": 170,
266         "return": {
267           "type": "String",
268           "doc": "<p>The padded string</p>\n"
269         },
270         "html_filename": "String.html"
271       },
272       {
273         "deprecated": null,
274         "alias": null,
275         "protected": false,
276         "tagname": "method",
277         "href": "String.html#Ext-String-method-toggle",
278         "shortDoc": "Utility function that allows you to easily switch a string between two alternating values. ...",
279         "static": false,
280         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
281         "private": false,
282         "params": [
283           {
284             "type": "String",
285             "optional": false,
286             "doc": "<p>The current string</p>\n",
287             "name": "string"
288           },
289           {
290             "type": "String",
291             "optional": false,
292             "doc": "<p>The value to compare to the current string</p>\n",
293             "name": "value"
294           },
295           {
296             "type": "String",
297             "optional": false,
298             "doc": "<p>The new value to use if the string already equals the first value passed in</p>\n",
299             "name": "other"
300           }
301         ],
302         "name": "toggle",
303         "owner": "Ext.String",
304         "doc": "<p>Utility function that allows you to easily switch a string between two alternating values.  The passed value\nis compared to the current string, and if they are equal, the other value that was passed in is returned.  If\nthey are already different, the first value passed in is returned.  Note that this method returns the new value\nbut does not change the current string.</p>\n\n<pre><code>    // alternate sort directions\n    sort = Ext.String.toggle(sort, 'ASC', 'DESC');\n\n    // instead of conditional logic:\n    sort = (sort == 'ASC' ? 'DESC' : 'ASC');\n       </code></pre>\n\n",
305         "linenr": 149,
306         "return": {
307           "type": "String",
308           "doc": "<p>The new value</p>\n"
309         },
310         "html_filename": "String.html"
311       },
312       {
313         "deprecated": null,
314         "alias": null,
315         "protected": false,
316         "tagname": "method",
317         "href": "String.html#Ext-String-method-trim",
318         "shortDoc": "Trims whitespace from either end of a string, leaving spaces within the string intact. ...",
319         "static": false,
320         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
321         "private": false,
322         "params": [
323           {
324             "type": "String",
325             "optional": false,
326             "doc": "<p>The string to escape</p>\n",
327             "name": "string"
328           }
329         ],
330         "name": "trim",
331         "owner": "Ext.String",
332         "doc": "<p>Trims whitespace from either end of a string, leaving spaces within the string intact.  Example:\n@example\nvar s = '  foo bar  ';\nalert('-' + s + '-');         //alerts \"- foo bar -\"\nalert('-' + Ext.String.trim(s) + '-');  //alerts \"-foo bar-\"</p>\n",
333         "linenr": 87,
334         "return": {
335           "type": "String",
336           "doc": "<p>The trimmed string</p>\n"
337         },
338         "html_filename": "String.html"
339       },
340       {
341         "deprecated": null,
342         "alias": null,
343         "protected": false,
344         "tagname": "method",
345         "href": "String.html#Ext-String-method-urlAppend",
346         "shortDoc": "Appends content to the query string of a URL, handling logic for whether to place\na question mark or ampersand. ...",
347         "static": false,
348         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
349         "private": false,
350         "params": [
351           {
352             "type": "String",
353             "optional": false,
354             "doc": "<p>The URL to append to.</p>\n",
355             "name": "url"
356           },
357           {
358             "type": "String",
359             "optional": false,
360             "doc": "<p>The content to append to the URL.</p>\n",
361             "name": "string"
362           }
363         ],
364         "name": "urlAppend",
365         "owner": "Ext.String",
366         "doc": "<p>Appends content to the query string of a URL, handling logic for whether to place\na question mark or ampersand.</p>\n",
367         "linenr": 72,
368         "return": {
369           "type": "void",
370           "doc": "<p>(String) The resulting URL</p>\n"
371         },
372         "html_filename": "String.html"
373       }
374     ],
375     "property": [
376
377     ],
378     "cssVar": [
379
380     ],
381     "cssMixin": [
382
383     ],
384     "event": [
385
386     ]
387   },
388   "singleton": true,
389   "alias": null,
390   "superclasses": [
391
392   ],
393   "protected": false,
394   "tagname": "class",
395   "mixins": [
396
397   ],
398   "href": "String.html#Ext-String",
399   "subclasses": [
400
401   ],
402   "static": false,
403   "author": null,
404   "component": false,
405   "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/lang/String.js",
406   "private": false,
407   "alternateClassNames": [
408
409   ],
410   "name": "Ext.String",
411   "doc": "<p>A collection of useful static methods to deal with strings</p>\n",
412   "mixedInto": [
413
414   ],
415   "linenr": 1,
416   "xtypes": [
417
418   ],
419   "html_filename": "String.html",
420   "extends": null
421 });