CS3 JS: String

CS3 JavaScript

String

 Character strings. Each character is adressable by index.

QuickLinks

String, anchor, big, blink, bold, charAt, charCodeAt, concat, fixed, fontcolor, fontsize, fromCharCode, indexOf, italics, lastIndexOf, link, localeCompare, match, replace, search, slice, small, split, strike, sub, substr, substring, sup, toLocaleLowerCase, toLocaleUpperCase, toLowerCase, toSource, toString, toUpperCase, valueOf

Properties

PropertyTypeAccessDescription
lengthnumberreadonlyThe length of the string.

Methods

String String (value:any)
Returns a string representation of the value given as an argument.

ParameterTypeDescription
value any A number, variable, or object to convert to a string.

string anchor (name:string)
Returns a string consisting of this string enclosed in a <a> tag.

ParameterTypeDescription
namestringThe text to be stored in the anchors' name attribute.

string big ()
Returns a string consisting of this string enclosed in a <big> tag.

string blink ()
Returns a string consisting of this string enclosed in a <blink> tag.

string bold ()
Returns a string consisting of this string enclosed in a <b> tag.

string charAt (index:number)
Returns the character at the specified index.

ParameterTypeDescription
indexnumberAn integer between 0 and string.length -1, specifying the character to return.

number charCodeAt (index:number)
Returns the Unicode value of the character at the given index.

ParameterTypeDescription
indexnumberAn integer between 0 and string.length -1, specifying the character.

string concat (value:string)
If necessary, converts the one or more given values to strings.

ParameterTypeDescription
valuestringThe values to be concatenated with the given string.

string fixed ()
Returns a string consisting of this string enclosed in a <tt> tag.

string fontcolor (color:string)
Returns a string consisting of this string enclosed in a <font> tag.

ParameterTypeDescription
colorstringThe value to be stored in the tag's color attribute.

string fontsize (size:number)
Returns a string consisting of this string enclosed in a <font> tag.

ParameterTypeDescription
sizenumberThe value to be stored in the tag's size attribute.

String fromCharCode (value1:number)
Returns a string created by concatenation one or more characters specified as ASCII values.

ParameterTypeDescription
value1numberOne or more ASCII values.

number indexOf (searchValue:string, offset:number)
Returns the index within the string of the first occurrence of the specified string, starting the search at fromIndex if provided.

ParameterTypeDescription
searchValuestringThe string for which to search.
offsetnumberThe starting offset of the search.

string italics ()
Returns a string consisting of this string enclosed in a <i> tag.

number lastIndexOf (searchValue:string, offset:number)
Returns the index within the string of the last occurrence of the specified value.

ParameterTypeDescription
searchValuestringThe string for which to search.
offsetnumberThe starting offset of the search.

string link (href:string)
Returns a string consisting of this string enclosed in a <a> tag.

ParameterTypeDescription
hrefstringThe value to be stored in the tag's href attribute.

number localeCompare (what:string)
Performs a localized comparison of two strings.

ParameterTypeDescription
whatstringThe string to compare with.

Array match (regexp:RegExp)
Matches a string against a regular expression.

ParameterTypeDescription
regexpRegExpThe regular expression to use.

string replace (what:any, with:string)

ParameterTypeDescription
what any
withstring

number search (search:RegExp)

ParameterTypeDescription
searchRegExp

string slice (startSlice:number, endSlice:number)
Extracts a substring of the given string and returns it as a new string.

ParameterTypeDescription
startSlicenumberThe index at which to begin extraction.
endSlicenumberThe index at which to end extraction.

string small ()
Returns a string consisting of this string enclosed in a <small> tag.

string split (delimiter:string, limit:number)
Splits a string into a group of substrings, places those strings in an array, and returns the array.

ParameterTypeDescription
delimiterstringSpecifies the string to use for delimiting.
limitnumber

string strike ()
Returns a string consisting of this string enclosed in a <strike> tag.

string sub ()
Returns a string consisting of this string enclosed in a <sub> tag.

string substr (start:number, length:number)
Returns a string containing the characters beginning at the specified index, start, through the specified number of characters.

ParameterTypeDescription
startnumberLocation at which to begin extracting characters.
lengthnumber(OptIonal) The number of characters to extract.

string substring (indexA:number [, indexB:number])
Returns a substring of the given string by extracting characters from indexA up to but not including indexB.

ParameterTypeDescription
indexAnumberThe index to begin extracting.
indexBnumber(Optional) The index at which to end extraction.

string sup ()
Returns a string consisting of this string enclosed in a <sup> tag.

string toLocaleLowerCase ()
Returns a new string which contains all the characters of the original string converted to lowercase (localized).

string toLocaleUpperCase ()
Returns a new string which contains all the characters of the original string converted to uppercase (localized).

string toLowerCase ()
Returns a new string which contains all the characters of the original string converted to lowercase.

string toSource ()
Creates a string representation of this object that can be fed back to eval() to re-create an object. Works only with built-in classes.

string toString ()
Returns itself.

string toUpperCase ()
Returns a new string which contains all the characters of the original string converted to uppercase.

string valueOf ()
Returns itself.

Return

String String.String (value:any)

String String.fromCharCode (value1:number)

Contents :: Index