contents   index   previous   next



String()

syntax:

new String([value])

where:

value - value to be converted to a string as this string object.

 

return:

This method returns a new string object whose value is the supplied value.

 

description:

If value is not supplied, then the empty string "" is used instead. Otherwise, the value ToString(value) is used. Note that if this function is called directly, without the new operator, then the same construction is done, but the returned variable is converted to a string, rather than being returned as an object.

 

see:

RegExp()

 

example:

var s = new String(123);

 


String charAt()