Set::String

Strings as objects with lots of handy methods (including set comparisons) and support for method chaining.
Download

Set::String Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Daniel Berger
  • Publisher web site:
  • http://search.cpan.org/~djberg/Net-SCP-Expect-0.12/Expect.pm

Set::String Tags


Set::String Description

Strings as objects with lots of handy methods (including set comparisons) and support for method chaining. Set::String is a Perl module that offers strings as objects with lots of handy methods (including set comparisons) and support for method chaining.SYNOPSISmy $s1 = Set::String->new("Hello");my $s2 = Set::String->new("World! ");$s1->length->print; # prints 5$s1->ord->join->print; # prints 72,101,108,108,111$s2->chop(3)->print; # prints 'Worl'Set::String allows you to create strings as objects and use OO-style methods on them. Many convenient methods are provided here that appear in the FAQ's, the Perl Cookbook or posts from comp.lang.perl.misc. In addition, there are Set methods with corresponding (overloaded) operators for the purpose of Set comparison, i.e. +, ==, etc.The purpose is to provide built-in methods for operations that people are always asking how to do, and which already exist in languages like Ruby. This should (hopefully) improve code readability and/or maintainability. The other advantage to this module is method-chaining by which any number of methods may be called on a single object in a single statement.Note that Set::String is a subclass of Set::Array, and your string objects are really just treated as an array of characters, ala C. All methods available in Set::Array are available to you. Requirements: · Perl


Set::String Related Software