Packageflash.globalization
Classpublic final class NumberParseResult
InheritanceNumberParseResult Inheritance Object

Language version: ActionScript 3.0
Runtime version: AIR 2

A data structure that holds information about a number that was extracted by parsing a string.

The number string can contain a prefix and suffix surrounding a number. In such cases the startIndex property is set to the first character of the number. Also, the endIndex property is set to the index of the character that follows the last character of the number.

See also

NumberFormatter.parse()
NumberFormatter.parseNumber()


Public Properties
 PropertyDefined by
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  endIndex : int
[read-only] The index of the character after the last character of the numeric portion of the input string.
NumberParseResult
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  startIndex : int
[read-only] The index of the first character of the numeric portion of the input string.
NumberParseResult
  value : Number
[read-only] The value of the numeric portion of the input string.
NumberParseResult
Public Methods
 MethodDefined by
  
NumberParseResult(value:Number, startIndex:int = 0x7fffffff, endIndex:int = 0x7fffffff)
Constructs a number parse result object.
NumberParseResult
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Property detail
endIndexproperty
endIndex:int  [read-only]

Language version: ActionScript 3.0
Runtime version: AIR 2

The index of the character after the last character of the numeric portion of the input string.

Implementation
    public function get endIndex():int
startIndexproperty 
startIndex:int  [read-only]

Language version: ActionScript 3.0
Runtime version: AIR 2

The index of the first character of the numeric portion of the input string.

Implementation
    public function get startIndex():int
valueproperty 
value:Number  [read-only]

Language version: ActionScript 3.0
Runtime version: AIR 2

The value of the numeric portion of the input string.

Implementation
    public function get value():Number
Constructor detail
NumberParseResult()constructor
public function NumberParseResult(value:Number, startIndex:int = 0x7fffffff, endIndex:int = 0x7fffffff)

Language version: ActionScript 3.0
Runtime version: AIR 2

Constructs a number parse result object. NumberParseResult objects are usually created by the NumberFormatter.parse() and NumberFormatter.parseNumber() methods, rather than by calling this constructor directly.

Parameters
value:Number — The value of the numeric portion of the input string.
 
startIndex:int (default = 0x7fffffff) — The index of the first character of the number in the input string.
 
endIndex:int (default = 0x7fffffff) — The index of the character after the last character of the number in the input string.

See also