Jaxer.Range : Object
Return to: Jaxer Framework index

Represents a block of text within a string.

Platform Support

Jaxer Server Framework Jaxer Client Framework
0.9 no

Constructors

Constructor Action Jaxer Server Framework Jaxer Client Framework
Jaxer.Range Constructor(Number start, Number end) : Jaxer.Range
The Range class is used to represent a block of text within a string.
Show Details 0.9 no

Jaxer.Range(Number start, Number end) : Jaxer.Range

The Range class is used to represent a block of text within a string.

Parameters
Number start The offset to the beginning of the range
Number end The offset to the end of the range

Returns
Jaxer.Range Returns an instance of Range.

Functions

Method Action Jaxer Server Framework Jaxer Client Framework
contains(Number value) : Boolean
Determine if the specified value is contained by this range. Note that the value must be contained by the half-open interval [ start,end). This means that a value equal to the ending offset of this range is not considered to be contained by the range. However, an offset equal to the start of this range is within the ragne.
Show Details 0.9 no

Parameters
Number value The value to test

Returns
Boolean Returns true if the value is contained within this range

isEmpty() : Boolean
Determine if this range contains any content. This method will return true if the start of this rang eis greater than or equal to the end of this range.
Show Details 0.9 no

Returns
Boolean Returns true if this range is empty

isOverlapping(Jaxer.Range range) : Boolean
Determines if two ranges are overlapping. Note this uses the contains method to determine the overlap so the same rules about half-open intervals mentioned in that method's description also apply here.
Show Details 0.9 no

Parameters
Jaxer.Range range The range to test

Returns
Boolean Returns true if the ranges overlap

aptana_docs