String | NN 2 IE J1 ECMA 1
A String object represents any sequence of zero or more characters that are to be treated strictly as text (that is, no math operations are to be applied). A large library of methods are divided into two categories. One category surrounds a string with a pair of HTML tags for a variety of HTML character formatting. These methods are used primarily to assist statements that use document.write() to dynamically create content. The second method category is the more traditional set of string parsing and manipulation methods that facilitate character and substring extraction, case changes, and conversion from string lists to JavaScript arrays. By and large, you don't have to worry about explicitly creating a string beyond a simple assignment of a quoted string value:
    var myString = "howdy"
Occasionally, however, it is helpful to create a string object using the constructor of the static String object. Preparing string values for passage to Java applets often requires this type of string generation:
    var myString = new String("howdy")
Other than the constructor, prototype property, and fromCharCode() method, all properties and methods are for use with instances of the String object, rather than the static String object.
Creating a String Object
    var myValue = "someString"
    var myValue = new String("someString")

length | NN 2 IE J1 ECMA 1
| Read-only
A count of the number of characters in the string. String values dynamically change their lengths if new values are assigned to them or if other strings are concatenated.
Example
    for (var i = 0; i < myString.length; i++) {
        ...
    }
Value Integer.

prototype | NN 3 IE J2 ECMA 1
| Read/Write
A property of the static String object. Use the prototype property to assign new properties and methods to future instances of a String value created in the current document. See the Array.prototype property description for examples. There is little need to create new prototype properties or methods for the String object.
Example
    String.prototype.author = "DG"
Value Any data, including function references.

anchor() | NN 2 IE J1 ECMA n/a
anchor(anchorName) |
Returns a copy of the string embedded within an anchor (<A>) tag set. The value passed as a parameter is assigned to the NAME attribute of the tag.
Returned Value A string within an A element.
Parameters
anchorName | A string to use as the value of the NAME attribute.

big() | NN 2 IE J1 ECMA n/a
Returns a copy of the string embedded within a <BIG> tag set.
Returned Value A string within a BIG element.
Parameters None.

blink() | NN 2 IE J1 ECMA n/a
Returns a copy of the string embedded within a <BLINK> tag set.
Returned Value A string within a BLINK element.
Parameters None.

bold() | NN 2 IE J1 ECMA n/a
Returns a copy of the string embedded within a <B> tag set.
Returned Value A string within a B element.
Parameters None.

charAt() | NN 2 IE J1 ECMA 1
charAt(positionIndex) |
Returns a single character string of the character located at the zero-based index position passed as a parameter. Use this method instead of substring() when only one character from a known position is needed from a string.
Returned Value A one-character string. In newer browser versions, an empty string is returned if the parameter value points to a character beyond the length of the string.
Parameters
positionIndex | Zero-based integer.

charCodeAt() | NN 4 IE J3 ECMA 1
charCodeAt(positionIndex) |
Returns a number of the decimal Unicode value for the character located at the zero-based index position passed as a parameter. For common alphanumeric characters, the Unicode values are the same as ASCII values.
Returned Value A positive integer. Returns NaN if the parameter value points to a character beyond the length of the string.
Parameters
positionIndex | Zero-based integer.

concat() | NN 4 IE J3 ECMA n/a
concat(string2) |
Returns a string that appends the parameter string to the current string object. The results of this method are the same as concatenating strings with the add (+) or add-by-value (+=) operators. Neither the method nor operators insert spaces between the two string components.
Returned Value String.
Parameters
string2 | Any string.

fixed() | NN 2 IE J1 ECMA n/a
Returns a copy of the string embedded within a <TT> tag set.
Returned Value A string within a TT element.
Parameters None.

fontcolor() | NN 2 IE J1 ECMA n/a
fontColor(color) |
Returns a copy of the string embedded within a font (<FONT>) tag set. The value passed as a parameter is assigned to the COLOR attribute of the tag.
Returned Value A string within a FONT element.
Parameters
color | A string to use as the value of the COLOR attribute.

fontsize() | NN 2 IE J1 ECMA n/a
fontSize(size) |
Returns a copy of the string embedded within a font (<FONT>) tag set. The value passed as a parameter is assigned to the SIZE attribute of the tag.
Returned Value A string within a FONT element.
Parameters
size | An integer to use as the value of the SIZE attribute.

fromCharCode() | NN 4 IE J3 ECMA n/a
fromCharCode(num1, [, num2,[...numN]]) |
A static method that returns a string of one or more characters whose Unicode values are passed as a comma-delimited list of parameters. For example, the expression:
    String.fromCharCode(120, 121, 122)
returns "xyz".
Returned Value A string.
Parameters
num1...numN | One or more integer values in an unquoted, comma-delimited list.

indexOf() | NN 2 IE J1 ECMA 1
indexOf(searchString[, startPositionIndex]) |
Returns a zero-based integer of the position within the current string where the searchString parameter starts. Normally, the search starts with the first (index of zero) character, but you may have the search begin later in the string by specifying the optional second parameter, which is the index value of where the search should start. If there is no match, the returned value is -1. This is a backward-compatible quick way to find out if one string contains another: If the returned value is -1 then you know the searchString is not in the larger string. If the returned value is another number (the precise value doesn't matter), the searchString is in the larger string. For Version 4 browsers, the String object's search() method performs a similar function.
Returned Value Integer.
Parameters
searchString | A string to look for in the current string object
startPositionIndex | A zero-based integer indicating the position within the current string object to begin the search of the first parameter

italics() | NN 2 IE J1 ECMA n/a
Returns a copy of the string embedded within an <I> tag set.
Returned Value A string within an I element.
Parameters None.

lastIndexOf() | NN 2 IE J1 ECMA 1
lastIndexOf(searchString[, startPositionIndex]) |
Returns a zero-based integer of the position within the current string object where the searchString parameter starts. This method works like the indexOf() method but begins all searches from the end of the string or some index position. Even though searching starts from the end of the string, the startPositionIndex parameter is based on the start of the string, as is the returned value. If there is no match, the returned value is -1.
Returned Value Integer.
Parameters
searchString | A string to look for in the current string object.
startPositionIndex | A zero-based integer indicating the position within the current string object to begin the search of the first parameter. Even though the search starts from the end of the string, this parameter value is relative to the front of the string.

link() | NN 2 IE J1 ECMA n/a
link(URL) |
Returns a copy of the string embedded within an anchor (<A>) tag set. The value passed as a parameter is assigned to the HREF attribute of the tag.
Returned Value A string within an A element.
Parameters
URL | A string to use as the value of the HREF attribute.

match() | NN 4 IE J3 ECMA n/a
match(regexpression) |
Returns an array of strings within the current string that match the regular expression passed as a parameter. For example, if you pass a regular expression that specifies any five-digit number, the returned value of the match() method would be an array of all five-digit numbers (as strings) in the main string. Properties of the RegExp static object are influenced by this method's operation.
Returned Value An array of strings.
Parameters
regexpression | A regular expression object. See the regular expression object for the syntax to create a regular expression object.

replace() | NN 4 IE J3 ECMA n/a
replace(regexpression, replaceString) |
Returns the new string that results when all matches of the regexpression parameter are replaced by the replaceString parameter. The original string is unharmed in the process.
Returned Value A string.
Parameters
regexpression | A regular expression object. See the regular expression object for the syntax to create a regular expression object.
replaceString | A string that is to take the place of all matches of regexpression in the current string.

search() | NN 4 IE J3 ECMA n/a
search(regexpression) |
Returns the zero-based indexed value of the first character in the current string that matches the pattern of the regexpression parameter. This method is similar to the indexOf() method, but the search is performed with a regular expression rather than a straight string.
Returned Value Integer.
Parameters
regexpression | A regular expression object. See the regular expression object for the syntax to create a regular expression object.

slice() | NN 4 IE J3 ECMA n/a
slice(startPositionIndex, endPositionIndex]) |
Returns a substring of the current string. The substring is copied from the main string starting at the zero-based index count value of the character in the main string. If no second parameter is provided, the substring extends to the end of the main string. The optional second parameter can be another zero-based index value of where the substring should end. This value may also be a negative value, which counts from the end of the string toward the front.
Returned Value String.
Parameters
startPositionIndex | A zero-based integer indicating the position within the current string object to start copying characters.
endPositionIndex | A zero-based integer indicating the position within the current string object to end copying characters. Negative values count inward from the end of the string.

small() | NN 2 IE J1 ECMA n/a
Returns a copy of the string embedded within a <SMALL> tag set.
Returned Value A string within a SMALL element.
Parameters None.

split() | NN 4 IE J3 ECMA 1
split(delimiter [, limitInteger]) |
Returns a new array object whose elements are segments of the current string. The current string is divided into array entries at each instance of the delimiter string specified as the first parameter of the method. The delimiter does not become part of the array. You do not have to declare the array prior to stuffing the results of the split() method. For example, if a string consists of a comma-delimited list of names, you can convert the list into an array as follows:
    var listArray = stringList.split(",")
You may also use a regular expression as the parameter to divide the string by a pattern rather than a fixed character.
Returned Value Array.
Parameters
delimiter | A string or regular expression that defines where the main string is divided into elements of the resulting array.
limitInteger | An optional integer that restricts the number of items converted into array elements. This parameter is recognized only by Navigator 4.

strike() | NN 2 IE J1 ECMA n/a
Returns a copy of the string embedded within a <STRIKE> tag set.
Returned Value A string within a STRIKE element.
Parameters None.

sub() | NN 2 IE J1 ECMA n/a
Returns a copy of the string embedded within a <SUB> tag set.
Returned Value A string within a SUB element.
Parameters None.

substr() | NN 4 IE J3 ECMA n/a
substr(startPositionIndex [, length]) |
Returns a copy of an extract from the current string. The extract begins at the zero-based index position of the current string as specified by the first parameter of the method. If no other parameter is provided, the extract continues to the end of the main string. The second parameter can specify an integer of the number of characters to be extracted from the main string. In contrast, the substring() method's parameters point to the start and end position index values of the main string.
Returned Value A string.
Parameters
startPositionIndex | A zero-based integer indicating the position within the current string object to start copying characters
length | An optional integer of the number of characters to extract, starting with the character indicated by the startPositionIndex parameter

substring() | NN 2 IE J1 ECMA 1
substring(startPositionIndex, endPositionIndex) |
Returns a copy of an extract from the current string. The extract begins at the zero-based index position of the current string as specified by the first parameter of the method and ends at the character whose index is specified by the second parameter. In contrast, the substr() method's parameters point to the start position of the main string and the number of characters (length) to extract.
Returned Value A string.
Parameters
startPositionIndex | A zero-based integer indicating the position within the current string object to start copying characters
endPositionIndex | A zero-based integer indicating the position within the current string object to end copying characters

sup() | NN 2 IE J1 ECMA n/a
Returns a copy of the string embedded within a <SUP> tag set.
Returned Value A string within a SUP element.
Parameters None.

toLowerCase(), toUpperCase() | NN 2 IE J1 ECMA 1
Returns a copy of the current string in all lowercase or uppercase letters. If you want to replace the current string with a case-adjusted version, assign the result of the method to the same string:
    myString = myString.toUpperCase()
It is common to use either one of these methods to create a case-insensitive comparison of two strings. This is especially convenient if one of the strings being compared is entered by a user, who may submit a variety of case situations:
    if (document.forms[0].entry.value.toLowerCase() == compareValue) {
        ...
    }
Returned Value String.
Parameters