NAME

cs::Range - a set of positive numeric ranges, such as found in a newsrc file


SYNOPSIS

use cs::Range;


OBJECT CREATION

new cs::Range (irange,roundfn)

Create a new cs::Range with initial values form the text string irange, which is applied with the AddRange() method.


OBJECT METHODS

AddText(range)

Add the range in the supplied text string to this object.

Add(low,high)

Add the values from low to high inclusive. high is optional, and defaults to low.

Del(low,high)

Delete the values from low to high inclusive. high is optional, and defaults to low.

SubRanges()

Return an array of arrayrefs, each of the form [low,high].

Text()

Return the textual transcription of the object.

Enum()

Return an array of every number in the range in order.

Bounds()

Return the lowest and highest values in the range. Returns the array (0,0) with an empty range.

InRange(n)

Test whether the value n is in the range.

Invert()

Return a new cs::Range consisting of the gaps in this range.


AUTHOR

Cameron Simpson <cs@zip.com.au>