flash.globalization

# NumberParseResult - AS3

Package | flash.globalization
Class | public final class NumberParseResult
Inheritance | NumberParseResult Object

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, 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.

Related API Elements

NumberFormatter.parse()
NumberFormatter.parseNumber()

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : 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
|  | 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
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | NumberParseResult(value:Number = NaN, startIndex:int = 0x7fffffff, endIndex:int = 0x7fffffff) Constructs a number parse result object. | NumberParseResult
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

### endIndex

property

`endIndex:int` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, 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`

### startIndex

property

`startIndex:int` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

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

Implementation
`public function get startIndex():int`

### value

property

`value:Number` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, 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 = NaN, startIndex:int = 0x7fffffff, endIndex:int = 0x7fffffff)`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, 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` (default = `NaN`)`` — 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.

Related API Elements

NumberFormatter.parse()
NumberFormatter.parseNumber()

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00