Roo/UndoManager.js
[roojs1] / docs / symbols / String.json
1 {
2   "name" : "String",
3   "augments" : [],
4   "childClasses" : {  },
5   "tree_children" : [],
6   "tree_parent" : [],
7   "desc" : "",
8   "isSingleton" : false,
9   "isStatic" : false,
10   "isBuiltin" : true,
11   "isAbstract" : false,
12   "isBuilderTop" : false,
13   "memberOf" : "String",
14   "example" : "",
15   "deprecated" : "",
16   "since" : "",
17   "see" : "",
18   "params" : [],
19   "returns" : [],
20   "throws" : "",
21   "requires" : "",
22   "config" : [],
23   "methods" : [
24     {
25       "name" : "escape",
26       "type" : "function",
27       "desc" : "Escapes the passed string for ' and \\",
28       "sig" : "(string)",
29       "static" : true,
30       "memberOf" : "",
31       "isStatic" : true,
32       "isConstructor" : false,
33       "isPrivate" : false,
34       "example" : "",
35       "deprecated" : "",
36       "since" : "",
37       "see" : "",
38       "exceptions" : "",
39       "requires" : "",
40       "params" : [
41         {
42           "name" : "string",
43           "type" : "String",
44           "desc" : "The string to escape",
45           "isOptional" : false
46         }
47       ],
48       "returns" : [
49         {
50           "name" : "",
51           "type" : "String",
52           "desc" : "The escaped string"
53         }
54       ]
55     },
56     {
57       "name" : "toUpperCaseFirst",
58       "type" : "function",
59       "desc" : "Make the first letter of a string uppercase",
60       "sig" : "()\n{\n\n}",
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       "returns" : [
74         {
75           "name" : "",
76           "type" : "String",
77           "desc" : "The new string."
78         }
79       ]
80     },
81     {
82       "name" : "leftPad",
83       "type" : "function",
84       "desc" : "Pads the left side of a string with a specified character.  This is especially useful\nfor normalizing number and date strings.  Example usage:\n<pre><code>\nvar s = String.leftPad('123', 5, '0');\n// s now contains the string: '00123'\n</code></pre>",
85       "sig" : "(string, size, char)",
86       "static" : true,
87       "memberOf" : "",
88       "isStatic" : true,
89       "isConstructor" : false,
90       "isPrivate" : false,
91       "example" : "",
92       "deprecated" : "",
93       "since" : "",
94       "see" : "",
95       "exceptions" : "",
96       "requires" : "",
97       "params" : [
98         {
99           "name" : "string",
100           "type" : "String",
101           "desc" : "The original string",
102           "isOptional" : false
103         },
104         {
105           "name" : "size",
106           "type" : "Number",
107           "desc" : "The total length of the output string",
108           "isOptional" : false
109         },
110         {
111           "name" : "char",
112           "type" : "String",
113           "desc" : "(optional) The character with which to pad the original string (defaults to empty string \" \")",
114           "isOptional" : false
115         }
116       ],
117       "returns" : [
118         {
119           "name" : "",
120           "type" : "String",
121           "desc" : "The padded string"
122         }
123       ]
124     },
125     {
126       "name" : "toggle",
127       "type" : "function",
128       "desc" : "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.\n<pre><code>\n// alternate sort directions\nsort = sort.toggle('ASC', 'DESC');\n\n// instead of conditional logic:\nsort = (sort == 'ASC' ? 'DESC' : 'ASC');\n</code></pre>",
129       "sig" : "(value, other)",
130       "static" : false,
131       "memberOf" : "",
132       "isStatic" : false,
133       "isConstructor" : false,
134       "isPrivate" : false,
135       "example" : "",
136       "deprecated" : "",
137       "since" : "",
138       "see" : "",
139       "exceptions" : "",
140       "requires" : "",
141       "params" : [
142         {
143           "name" : "value",
144           "type" : "String",
145           "desc" : "The value to compare to the current string",
146           "isOptional" : false
147         },
148         {
149           "name" : "other",
150           "type" : "String",
151           "desc" : "The new value to use if the string already equals the first value passed in",
152           "isOptional" : false
153         }
154       ],
155       "returns" : [
156         {
157           "name" : "",
158           "type" : "String",
159           "desc" : "The new value"
160         }
161       ]
162     },
163     {
164       "name" : "format",
165       "type" : "function",
166       "desc" : "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:\n<pre><code>\nvar cls = 'my-class', text = 'Some text';\nvar s = String.format('<div class=\"{0}\">{1}</div>', cls, text);\n// s now contains the string: '<div class=\"my-class\">Some text</div>'\n</code></pre>",
167       "sig" : "(string, value1, value2)",
168       "static" : true,
169       "memberOf" : "",
170       "isStatic" : true,
171       "isConstructor" : false,
172       "isPrivate" : false,
173       "example" : "",
174       "deprecated" : "",
175       "since" : "",
176       "see" : "",
177       "exceptions" : "",
178       "requires" : "",
179       "params" : [
180         {
181           "name" : "string",
182           "type" : "String",
183           "desc" : "The tokenized string to be formatted",
184           "isOptional" : false
185         },
186         {
187           "name" : "value1",
188           "type" : "String",
189           "desc" : "The value to replace token {0}",
190           "isOptional" : false
191         },
192         {
193           "name" : "value2",
194           "type" : "String",
195           "desc" : "Etc...",
196           "isOptional" : false
197         }
198       ],
199       "returns" : [
200         {
201           "name" : "",
202           "type" : "String",
203           "desc" : "The formatted string"
204         }
205       ]
206     },
207     {
208       "name" : "unicodeClean",
209       "type" : "function",
210       "desc" : "Remove invalid unicode characters from a string",
211       "sig" : "()\n{\n\n}",
212       "static" : false,
213       "memberOf" : "",
214       "isStatic" : false,
215       "isConstructor" : false,
216       "isPrivate" : false,
217       "example" : "",
218       "deprecated" : "",
219       "since" : "",
220       "see" : "",
221       "exceptions" : "",
222       "requires" : "",
223       "params" : [],
224       "returns" : [
225         {
226           "name" : "",
227           "type" : "String",
228           "desc" : "The clean string"
229         }
230       ]
231     }
232   ],
233   "events" : []
234 }