String Operators

Desigo CC scripting feature supports the following string operators which are part of the standard built-in ECMAScript objects.

For more details, see http://www.ecma-international.org/ecma-262/5.1/#sec-15.5.

String Constructor Called as a Function

When String is called as a function rather than as a constructor, it performs a type conversion.

  • String ( [ value ] )returns a String value (not a String object) computed by ToString(value). If value is not supplied, the empty String " " is returned.

String Constructor

When String is called as part of a new expression, it is a constructor: it initializes the newly created object.

 

Internal Properties of the String Constructor

[[Prototype]]

[[Class]]

[[Extensible]]

[[PrimitiveValue]]

 

Other Properties of the String Constructor

Length

String.prototype

String.fromCharCode ( [ char0 [ , char1 [ , … ] ] ] )

String Prototype Object

The String prototype object is a String object (its [[Class]] is "String") whose value is an empty string. Its constructor is: String.prototype.constructor.

 

Internal Properties of the String Prototype

[[Prototype]]

 

Other Properties of the String Prototype

Length

 

Methods of the String Prototype

String.prototype.toString ( )

String.prototype.valueOf ( )

String.prototype.charAt (pos)

String.prototype.charCodeAt (pos)

String.prototype.concat ( [ string1 [ , string2 [ , … ] ] ] )

String.prototype.indexOf (searchString, position)

String.prototype.lastIndexOf (searchString, position)

String.prototype.localeCompare (that)

String.prototype.match (regexp)

String.prototype.replace (searchValue, replaceValue)

String.prototype.search (regexp)

String.prototype.slice (start, end)

String.prototype.split (separator, limit)

String.prototype.substring (start, end)

String.prototype.toLowerCase ( )

String.prototype.toLocaleLowerCase ( )

String.prototype.toUpperCase ( )

String.prototype.toLocaleUpperCase ( )

String.prototype.trim ( )

Properties of String Instances

[[Class]]

[[PrimitiveValue]]

length