String
QuickLinks
Properties
Property | Type | Access | Description |
---|---|---|---|
length | number | readonly | The length of the string. |
Methods
Constructor
String String (value:
any)
Returns a string representation of the value given as an argument.
Parameter | Type | Description |
---|---|---|
value | any | A number, variable, or object to convert to a string. |
Example | new String(value) |
Class
String fromCharCode (value1:
number)
Returns a string created by concatenation one or more characters specified as ASCII values.
Parameter | Type | Description |
---|---|---|
value1 | number | One or more ASCII values. |
Example | String.fromCharCode(value1,...valueN) |
Instances
string anchor (name:
string)
Returns a string consisting of this string enclosed in a <a> tag.
Parameter | Type | Description |
---|---|---|
name | string | The 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.
Parameter | Type | Description |
---|---|---|
index | number | An integer between 0 and string.length -1, specifying the character to return. |
Example | string.charAt(index) |
number charCodeAt (index:
number)
Returns the Unicode value of the character at the given index.
Parameter | Type | Description |
---|---|---|
index | number | An integer between 0 and string.length -1, specifying the character. |
Example | string.charCodeAt(index) |
string concat (value:
string)
If necessary, converts the one or more given values to strings.
Those values are concatenated with the original string, the result is returned. The original string is not effected. Returns the concatenated string.
Parameter | Type | Description |
---|---|---|
value | string | The values to be concatenated with the given string. |
Example | string.concat(value1,...valueN) |
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.
Parameter | Type | Description |
---|---|---|
color | string | The 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.
Parameter | Type | Description |
---|---|---|
size | number | The value to be stored in the tag's size attribute. |
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.
Parameter | Type | Description |
---|---|---|
searchValue | string | The string for which to search. |
offset | number | The starting offset of the search. (Optional) |
Example | string.indexOf(searchValue, fromIndex) |
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.
The string is searched backward, starting at fromIndex. Returns the index within the string where the last occurrence of searchValue was found, or -1 if it was not found.
Parameter | Type | Description |
---|---|---|
searchValue | string | The string for which to search. |
offset | number | The starting offset of the search. (Optional) |
Example | string.lastIndexOf(searchValue, fromIndex) |
string link (href:
string)
Returns a string consisting of this string enclosed in a <a> tag.
Parameter | Type | Description |
---|---|---|
href | string | The value to be stored in the tag's href attribute. |
number localeCompare (what:
string)
Performs a localized comparison of two strings.
Parameter | Type | Description |
---|---|---|
what | string | The string to compare with. |
Array match (regexp:
RegExp)
Matches a string against a regular expression.
Parameter | Type | Description |
---|---|---|
regexp | RegExp | The regular expression to use. |
string replace (what: any, with: string)
Parameter | Type | Description |
---|---|---|
what | any | |
with | string |
number search (search: RegExp)
Parameter | Type | Description |
---|---|---|
search | RegExp |
string slice (startSlice:
number[, endSlice:
number])
Extracts a substring of the given string and returns it as a new string.
The substring begins at startSlice, and includes all characters up to, but not including the character at the index endSlice. A negative value indexes from the end of the string. For example, a negative value for startSlice is resolved as: string. length + startSlice. The original string is unchanged. Returns a substring of characters from the given string, starting at startSlice and ending with endSlice-1.
Parameter | Type | Description |
---|---|---|
startSlice | number | The index at which to begin extraction. |
endSlice | number | The index at which to end extraction. If omitted, slice extracts to the end of the string. (Optional) |
Example | string.slice(startSlice, endSlice) |
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.
The substrings are created by breaking the original string at places that match delimiter, the delimiter characters are removed. Returns an array whose elements are the substrings.
Parameter | Type | Description |
---|---|---|
delimiter | string | Specifies the string to use for delimiting. If delimiter is omitted, the array returned contains one element, consisting of the entire string. |
limit | number |
Example | string.split(delimiter) |
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.
The original string is unchanged. Returns a string containing the extracted characters.
Parameter | Type | Description |
---|---|---|
start | number | Location at which to begin extracting characters. |
length | number | (OptIonal) The number of characters to extract. |
Example | string.substr(start, length) |
string substring (indexA:
number[, indexB:
number])
Returns a substring of the given string by extracting characters from indexA up to but not including indexB.
The original string is unchanged. Returns a substring of characters from the given string, starting at indexA and ending with indexB-1.
Parameter | Type | Description |
---|---|---|
indexA | number | The index to begin extracting. |
indexB | number | (Optional) The index at which to end extraction. If omitted, slice extracts to the end of the string. |
Example | string.substring(indexA, indexB) |
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).
The original string is unchanged.
string toLocaleUpperCase ()
Returns a new string which contains all the characters of the original string converted to uppercase (localized).
The original string is unchanged.
string toLowerCase ()
Returns a new string which contains all the characters of the original string converted to lowercase.
The original string is unchanged.
Example | string.toLowerCase() |
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.
The original string is unchanged.
Example | string.toUpperCase() |
Element of
Button.alignment
Button.helpTip
Button.justify
Button.shortcutKey
Button.text
Button.type
Checkbox.alignment
Checkbox.helpTip
Checkbox.justify
Checkbox.shortcutKey
Checkbox.text
Checkbox.type
DropDownList.alignment
DropDownList.helpTip
DropDownList.shortcutKey
DropDownList.type
EditText.alignment
EditText.helpTip
EditText.justify
EditText.shortcutKey
EditText.text
EditText.textselection
EditText.type
Event.eventPhase
Event.type
FlashPlayer.alignment
FlashPlayer.helpTip
FlashPlayer.type
Group.alignChildren
Group.alignment
Group.helpTip
Group.orientation
Group.type
IconButton.alignment
IconButton.helpTip
IconButton.shortcutKey
IconButton.type
KeyboardState.keyName
ListBox.alignment
ListBox.helpTip
ListBox.shortcutKey
ListBox.type
ListItem.text
ListItem.type
Panel.alignChildren
Panel.alignment
Panel.helpTip
Panel.justify
Panel.orientation
Panel.text
Panel.type
Progressbar.alignment
Progressbar.helpTip
Progressbar.type
RadioButton.alignment
RadioButton.helpTip
RadioButton.justify
RadioButton.shortcutKey
RadioButton.text
RadioButton.type
ScriptUI.Alignment
ScriptUI.coreVersion
ScriptUI.frameworkName
ScriptUIBrush.theme
ScriptUIFont.family
ScriptUIFont.name
ScriptUIFont.substitute
ScriptUIImage.format
ScriptUIImage.name
ScriptUIImage.pathname
ScriptUIPen.theme
ScriptUIPen.type
Scrollbar.alignment
Scrollbar.helpTip
Scrollbar.shortcutKey
Scrollbar.type
Slider.alignment
Slider.helpTip
Slider.shortcutKey
Slider.type
StaticText.alignment
StaticText.helpTip
StaticText.justify
StaticText.shortcutKey
StaticText.text
StaticText.type
TreeView.alignment
TreeView.helpTip
TreeView.shortcutKey
TreeView.type
UIEvent.eventPhase
UIEvent.type
Window.alignChildren
Window.alignment
Window.frameworkName
Window.helpTip
Window.justify
Window.orientation
Window.shortcutKey
Window.text
Window.type
Used in:
Boolean Button.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
void Button.notify ([eventName: String])
Boolean Button.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Boolean Checkbox.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
void Checkbox.notify ([eventName: String])
Boolean Checkbox.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
ListItem DropDownList.add (type: String[, text: String])
Boolean DropDownList.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
ListItem DropDownList.find (text: String)
void DropDownList.notify ([eventName: String])
Boolean DropDownList.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Boolean EditText.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
void EditText.notify ([eventName: String])
Boolean EditText.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Event (SUI) Events.createEvent (eventType: String)
Boolean FlashPlayer.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Any FlashPlayer.invokePlayerFunction (name: String[, argument: Any])
void FlashPlayer.notify ([eventName: String])
Boolean FlashPlayer.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Object Group.add (type: String[, bounds: Bounds][, text: String][, properties: Object])
Boolean Group.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Boolean Group.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Boolean IconButton.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
void IconButton.notify ([eventName: String])
Boolean IconButton.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
ListItem ListBox.add (type: String[, text: String])
Boolean ListBox.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
ListItem ListBox.find (text: String)
void ListBox.notify ([eventName: String])
Boolean ListBox.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Object Panel.add (type: String[, bounds: Bounds][, text: String][, properties: Object])
Boolean Panel.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Boolean Panel.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Boolean Progressbar.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Boolean Progressbar.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Boolean RadioButton.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
void RadioButton.notify ([eventName: String])
Boolean RadioButton.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
String ScriptUI.getResourceText (text: String)
ScriptUIFont ScriptUI.newFont (name: String, style: String | Number, size: Number)
ScriptUIImage ScriptUI.newImage (normal: String[, disabled: String][, pressed: String][, rollover: String])
void ScriptUIGraphics.drawString (text: String, pen: ScriptUIPen, x: Number, y: Number[, font: ScriptUIFont])
Dimension ScriptUIGraphics.measureString (text: String[, font: ScriptUIFont][, boundingWidth: Number])
ScriptUIBrush ScriptUIGraphics.newBrush (type: Number, color: Array of Number | String)
ScriptUIPen ScriptUIGraphics.newPen (type: Number, color: Array of Number | String, width: Number)
Boolean Scrollbar.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
void Scrollbar.notify ([eventName: String])
Boolean Scrollbar.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Boolean Slider.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
void Slider.notify ([eventName: String])
Boolean Slider.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Boolean StaticText.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
void StaticText.notify ([eventName: String])
Boolean StaticText.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
ListItem TreeView.add (type: String[, text: String])
Boolean TreeView.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
ListItem TreeView.find (text: String)
void TreeView.notify ([eventName: String])
Boolean TreeView.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
UIEvent UIEvent.UIEvent (type: String[, captures: Boolean=false][, bubbles: Boolean=false][, view: Object][, detail: Number])
void UIEvent.initEvent (type: String[, captures: Boolean=false][, bubbles: Boolean=false][, cancelable: Boolean=false])
void UIEvent.initUIEvent (type: String[, captures: Boolean=false][, bubbles: Boolean=false][, view: Object][, detail: Number])
void Window.Window (type: String[, title: String][, bounds: Bounds][, properties: Object])
Object Window.add (type: String[, bounds: Bounds][, text: String][, properties: Object])
Boolean Window.addEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
void Window.alert (message: String[, title: String][, errorIcon: Boolean=false])
Boolean Window.confirm (message: String[, noAsDefault: Boolean=false][, title: String])
Window Window.find (type: String, title: String)
void Window.notify ([eventName: String])
String Window.prompt (prompt: String[, default: String][, title: String])
Boolean Window.removeEventListener (eventName: String, handler: Function[, capturePhase: Boolean=false])
Return
String ScriptUI.getResourceText (text: String)
String String.String (value: any)
String String.fromCharCode (value1: number)
String Window (SUI).prompt (prompt: String[, default: String][, title: String])
Jongware, 18-Jan-2015 v1.0 | Contents :: Index |