• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part: VII Appendixes > Wrapper Classes: Boolean, Number, String

Wrapper Classes: Boolean, Number, String

Table A.16. Methods and Attributes of Wrapper Classes: Boolean, Number, String
NameMethod/AttributeFormatDescription
Boolean.toStringMmyBoolean.toString()Returns the string representation (true) or (false) of myBoolean.
Boolean.valueOfMmyBoolean.valueOf()Returns the primitive value type of myBoolean.
Number.toStringMmyNumber.toString()Returns the string repre sentation of myNumber.
Number.valueOfMmyNumber.valueOf()Returns the primitive value of myNumber.
Number.MAX_VALUEAmyNumber.MAX_VALUEA constant, the largest number that ActionScript can represent: 1.79769313486231e+308.
Number.MIN_VALUEAmyNumber.MIN_VALUEA constant, the smallest number that ActionScript can represent: 5e-324.
Number.NaNAmyNumber.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_INFINITYAmyNumber.NEGATIVE_INFINITYA constant representing a value more negative than -Number.MAX_VALUE.
Number.POSITIVE_INFINITYAmyNumber.POSITIVE_INFINITYA constant representing a value more positive than Number.MAX_VALUE. (Same as the global constant Infinity.)
String.charAtMmyString.charAt(index)Returns the character at a specific location in myString.
String.charCodeAtMmyString.charCodeAt(index)Returns the Unicode encoding of the character at myString[index] as a 16-bit integer between 0 and 65,535.
String.concatMmyString.concat (value1,...valueN)Returns a new string resulting from concatenating (combining) myString and the strings specified in arguments (value1valueN).
String.fromCharCodeMMyString.fromCharCode (charCode1, charCode2, ...charCodeN)Returns a new string made up of the characters specified as character codes in the parameters.
String.indexOfMmyString.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.lastIndexOfMmyString.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.sliceMmyString.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 0. )
String.splitMmyString.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.substrMmyString.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.substringMmyString.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.toLowerCaseMmyString.toLowerCase()Returns a copy of myString, but with all characters in lowercase. The original value is unchanged.
String.toUpperCaseMmyString.toUpperCase()Returns a copy of myString, but with all characters in uppercase. The original value is unchanged.
String.valueOfMmyString.valueOf()Returns the primitive value type of the specified String object.
String.lengthAmyString.lengthThe length of the string.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint