![]() |
![]()
| ![]() |
![]()
NAMEMath::String::Sequence - defines a sequence (range) of Math::String(s) SYNOPSISuse Math::String::Sequence; use Math::String::Charset; $seq = Math::String::Sequence->new( a, zzz ); # set a-z $seq = Math::String::Sequence->new( a, zzz, ['z'..'a'] ); # set z..a $seq = Math::String::Sequence->new( { first => 'a', last => 'zzz', charset => ['z'..'a'] } ); # same $x = Math::String->new('a'); $y = Math::String->new('zz'); $seq = Math::String::Sequence->new( { first => $x, last => $y, } ); # same print "length: ",$seq->length(),"\n"; print "first: ",$seq->first(),"\n"; print "last: ",$seq->last(),"\n"; print "5th: ",$seq->string(5),"\n"; print "out-of-range: ",$seq->string(10000000),"\n"; # undef print "as array:: ",$seq->as_array(),"\n"; # as array REQUIRESperl5.005, Exporter, Math::BigInt, Math::String, Math::String::Charset EXPORTSExports nothing on default, but can export sequence(). DESCRIPTIONThis module creates a sequence, or range of Math::Strings. Given a first and last string it represents all strings in between, including first and last. The sequence can be reversed, unlike 'A'..'Z', which needs the first argument be smaller than the second.
USEFULL METHODS
BUGSNone discovered yet. LICENSEThis program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. AUTHORIf you use this module in one of your projects, then please email me. I want to hear about how my code helps you ;) This module is (C) Tels http://bloodgate.com 2001 - 2005.
|