Wrapper Classes: Boolean, Number, String

     

Wrapper Classes: Boolean , Number , String

Table A.16. Methods and Attributes of Wrapper Classes: Boolean , Number , String

Name

Method/Attribute

Format

Description

Boolean.toString

M

myBoolean.toString()

Returns the string representation ( true ) or ( false ) of myBoolean .

Boolean.valueOf

M

myBoolean.valueOf()

Returns the primitive value type of myBoolean .

Number.toString

M

myNumber.toString()

Returns the string repre sentation of myNumber .

Number.valueOf

M

myNumber.valueOf()

Returns the primitive value of myNumber .

Number.MAX_VALUE

A

myNumber.MAX_VALUE

A constant, the largest number that ActionScript can represent: 1.79769313486231e+308.

Number.MIN_VALUE

A

myNumber.MIN_VALUE

A constant, the smallest number that ActionScript can represent: 5e-324.

Number.NaN

A

myNumber.NaN

"Not a Number," a constant representing a value that is not a number but is used in a context where a number is expected.

Number.NEGATIVE_INFINITY

A

myNumber.NEGATIVE_INFINITY

A constant representing a value more negative than -Number.MAX_VALUE .

Number.POSITIVE_INFINITY

A

myNumber.POSITIVE_INFINITY

A constant representing a value more positive than Number.MAX_VALUE . (Same as the global constant Infinity .)

String.charAt

M

myString.charAt( index )

Returns the character at a specific location in myString .

String.charCodeAt

M

myString.charCodeAt( index )

Returns the Unicode encoding of the character at myString[ index ] as a 16-bit integer between 0 and 65,535.

String.concat

M

myString.concat ( value1 ,... valueN )

Returns a new string resulting from concatenating (combining) myString and the strings specified in arguments ( value1 valueN ).

String.fromCharCode

M

MyString.fromCharCode ( charCode1, charCode2 , ... charCodeN )

Returns a new string made up of the characters specified as character codes in the parameters.

String.indexOf

M

myString.indexOf (substring, [ startIndex ])

Searches the string, starting at startIndex , and returns the index of the first occurrence of substring . Returns -1 if substring is not found.

String.lastIndexOf

M

myString.lastIndexOf ( substring , [ startIndex ])

Searches the string, starting at startIndex , and returns the index of the last occurrence of substring . Returns -1 if substring is not found.

String.slice

M

myString.slice ( startIndex , [ endIndex ])

Returns a substring of the original string, starting at the character whose position in myString is startIndex , up to but not including the character whose position in myString is endIndex . (The index of the first character in the string is . )

String.split

M

myString.split (" delimiter ", [ limit ])

Splits a string into substrings by breaking it wherever the delimiter string occurs, and returns the substrings in an array. If you use an empty string ("") as a delimiter, each character in the string is an element in the returned array. If delimiter is undefined, the first and only element in the returned array is the entire string. The optional limit argument specifies the maximum number of sustrings that may be returned.

String.substr

M

myString.substr ( startIndex , [ length ])

Returns a substring that starts at startIndex and includes the number of characters specified in the length argument, or the rest of the characters in the string (if there is no length argument). If startIndex is negative, the starting position is determined from the end of the string, with -1 indicating the last character, -2 the second to last, and so on.

String.substring

M

myString.substring ( startIndex, endIndex )

Returns a substring starting at startIndex and ending one character before endIndex . If endIndex is omitted, the returned substring runs to the end of the string. If startIndex equals endIndex , the method returns the empty string. If startIndex is greater than endIndex , the Flash inter preter should swap them before running the function; in reality, it some times returns the empty string.

String.toLowerCase

M

myString.toLowerCase()

Returns a copy of myString , but with all characters in lowercase. The original value is unchanged.

String.toUpperCase

M

myString.toUpperCase()

Returns a copy of myString , but with all characters in uppercase. The original value is unchanged.

String.valueOf

M

myString.valueOf()

Returns the primitive value type of the specified String object.

String.length

A

myString.length

The length of the string.




Using Macromedia Studio MX 2004
Special Edition Using Macromedia Studio MX 2004
ISBN: 0789730421
EAN: 2147483647
Year: N/A
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net