Fix #5654 - roojspacker - get it working as a doc tool...
[roojs1] / docs / symbols / String.json
diff --git a/docs/symbols/String.json b/docs/symbols/String.json
new file mode 100644 (file)
index 0000000..051efd3
--- /dev/null
@@ -0,0 +1,183 @@
+{
+  "name" : "String",
+  "augments" : [
+  ],
+  "desc" : "",
+  "isSingleton" : false,
+  "isStatic" : false,
+  "isBuiltin" : true,
+  "memberOf" : "String",
+  "example" : "",
+  "deprecated" : "",
+  "since" : "",
+  "see" : "",
+  "params" : [
+  ],
+  "returns" : [
+  ],
+  "config" : [
+  ],
+  "methods" : [
+    {
+      "name" : "escape",
+      "desc" : "Escapes the passed string for ' and \\",
+      "isStatic" : true,
+      "isConstructor" : false,
+      "isPrivate" : false,
+      "memberOf" : "String",
+      "example" : "",
+      "deprecated" : "",
+      "since" : "",
+      "see" : "",
+      "params" : [
+        {
+          "name" : "string",
+          "type" : "String",
+          "desc" : "The string to escape",
+          "isOptional" : false
+        }
+      ],
+      "returns" : [
+        {
+          "name" : "",
+          "type" : "String",
+          "desc" : "The escaped string"
+        }
+      ]
+    },
+    {
+      "name" : "leftPad",
+      "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>",
+      "isStatic" : true,
+      "isConstructor" : false,
+      "isPrivate" : false,
+      "memberOf" : "String",
+      "example" : "",
+      "deprecated" : "",
+      "since" : "",
+      "see" : "",
+      "params" : [
+        {
+          "name" : "string",
+          "type" : "String",
+          "desc" : "The original string",
+          "isOptional" : false
+        },
+        {
+          "name" : "size",
+          "type" : "Number",
+          "desc" : "The total length of the output string",
+          "isOptional" : false
+        },
+        {
+          "name" : "char",
+          "type" : "String",
+          "desc" : "(optional) The character with which to pad the original string (defaults to empty string \" \")",
+          "isOptional" : false
+        }
+      ],
+      "returns" : [
+        {
+          "name" : "",
+          "type" : "String",
+          "desc" : "The padded string"
+        }
+      ]
+    },
+    {
+      "name" : "toggle",
+      "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>",
+      "isStatic" : false,
+      "isConstructor" : false,
+      "isPrivate" : false,
+      "memberOf" : "String",
+      "example" : "",
+      "deprecated" : "",
+      "since" : "",
+      "see" : "",
+      "params" : [
+        {
+          "name" : "value",
+          "type" : "String",
+          "desc" : "The value to compare to the current string",
+          "isOptional" : false
+        },
+        {
+          "name" : "other",
+          "type" : "String",
+          "desc" : "The new value to use if the string already equals the first value passed in",
+          "isOptional" : false
+        }
+      ],
+      "returns" : [
+        {
+          "name" : "",
+          "type" : "String",
+          "desc" : "The new value"
+        }
+      ]
+    },
+    {
+      "name" : "format",
+      "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>",
+      "isStatic" : true,
+      "isConstructor" : false,
+      "isPrivate" : false,
+      "memberOf" : "String",
+      "example" : "",
+      "deprecated" : "",
+      "since" : "",
+      "see" : "",
+      "params" : [
+        {
+          "name" : "string",
+          "type" : "String",
+          "desc" : "The tokenized string to be formatted",
+          "isOptional" : false
+        },
+        {
+          "name" : "value1",
+          "type" : "String",
+          "desc" : "The value to replace token {0}",
+          "isOptional" : false
+        },
+        {
+          "name" : "value2",
+          "type" : "String",
+          "desc" : "Etc...",
+          "isOptional" : false
+        }
+      ],
+      "returns" : [
+        {
+          "name" : "",
+          "type" : "String",
+          "desc" : "The formatted string"
+        }
+      ]
+    },
+    {
+      "name" : "unicodeClean",
+      "desc" : "Remove invalid unicode characters from a string",
+      "isStatic" : false,
+      "isConstructor" : false,
+      "isPrivate" : false,
+      "memberOf" : "String",
+      "example" : "",
+      "deprecated" : "",
+      "since" : "",
+      "see" : "",
+      "params" : [
+      ],
+      "returns" : [
+        {
+          "name" : "",
+          "type" : "String",
+          "desc" : "The clean string"
+        }
+      ]
+    }
+  ],
+  "events" : [
+  ]
+}
\ No newline at end of file