The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Range::String::Object - Implements Range::Interface::Object.

VERSION

This documentation describes version 0.01

DESCRIPTION

clear()

Returns the object after clearing its content.

empty()

Returns true if object is empty, false otherwise.

size()

Returns number of elements in range.

equal( object )

Overloads eq. Returns 1 if two objects are of equal value, 0 otherwise.

clone( object )

Returns a cloned object.

add( object )

Overloads +=. Returns the object after union with another object.

subtract( object )

Overloads -=. Returns the object after subtraction with another object.

intersect( object )

Overloads &=. Returns the object after intersection with another object.

multiply( object )

Overloads *=. Returns the object after each element in the second object is appended to all elements in this object. e.g.

( abc, 123 ) * ( 456, xyz ) = ( abc456, abcxyz, 123456, 123xzy )

list()

All elements in a list. Returns ARRAY reference in scalar context. Returns ARRAY in list context.

string( %symbol )

Returns a normalized range expression. Least effort is made on numeric compression. Therefore result will not be in "canonical" form. e.g.

a1b, a2b, a9b .. a100b results in a{1~2,9,10~99,100}b instead of a{1~2,9~100}b.

SEE ALSO

See Range::Interface::Object for additional methods.

AUTHOR

Kan Liu

COPYRIGHT and LICENSE

Copyright (c) 2010. Kan Liu

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.