These functions are available on every String object.
Public Properties
This class has no public properties.
Public Methods
|
| escape( String string )
:
String<static> Escapes the passed string for ' and \ <static> Escapes the passed string for ' and \ Parameters:string : StringThe string to escape Returns: | String |
| format( String string , String value1 , String value2 )
:
- String<static> Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each
-token... <static> Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each
-token must be unique, and must increment in the format {0}, {1}, etc. Example usage:
- var cls = 'my-class', text = 'Some text';
-var s = String.format('<div class="{0}">{1}</div>', cls, text);
+ String<static> Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each
+token ... <static> Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each
+token must be unique, and must increment in the format {0}, {1}, etc. Example usage:
+ var cls = 'my-class', text = 'Some text';
+var s = String.format('<div class="{0}">{1}</div>', cls, text);
// s now contains the string: '<div class="my-class">Some text</div>'
Parameters:Returns:String The formatted string
| String |
| leftPad( String string , Number size , [String char ] )
:
String<static> Pads the left side of a string with a specified character. This is especially useful
|