|
 |
A String object represents a text string in a DataWeb web. The String prototype object contains methods for convenient comparison and manipulation of primitive string values.
Constructor
[new]
String([initValue]) |
Constructs and returns a new String object instance, initialized with the data and length of the initValue
argument. |
|
Instance Properties
length |
Returns the number of characters in the string object instance. Read only. |
|
Instance Methods
charAt |
Returns
the character at a specified position in a string |
charCodeAt |
Returns
the ASCII code of the character at a specified position in a string. |
indexOf |
Returns the position of a specified part of a string.
|
lastIndexOf |
Returns the position of a specified part of a string.
|
replace |
Finds and
replaces substrings within a string.
|
split |
Returns an Array object whose elements are substrings of a specified string.
|
substring |
Returns
a substring of a specified string.
|
toLowerCase |
Converts the characters in a string to lower case.
|
toString |
Returns a string value containing the instance's string data. |
toUpperCase |
Coverts the characters in a string to upper case.
|
trim |
Removes any leading and trailing white space characters from a string.
|
valueOf |
Returns a string value containing the instance's string data. |
|
Prototype Methods
beginsWith |
Checks to see if a specified string begins with a specified substring.
|
beginsWithIgnoreCase |
Checks to see if a specified string begins with a specified substring. This check is case insensitive. |
equal |
Checks to see if two strings are equal. |
equalIgnoreCase |
Checks to see if two strings are equal. This check is case insensitive. |
fromCharCode |
Returns
a string value based on the ASCII characters
entered as arguments.
|
|
Example
var str = new String("Welcome to the Help site.");
return str.length;
//output: 25
|