The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

String::Iota - Simple interface to some useful string functions

SYNOPSIS

  use String::Iota;
  $str = "Just another perl hacker";
  print trim  $str, 4;   # Just
  print strim $str, 'p'; # Just another 
  @info = dismantle $str;
  print join ", ", @info; # 24, J, u, s, t,  , a, n, o, t, h, e, r,  , p, e, r, l,  , h, a, c, k, e, r
  
  open (FILE, "+<", "/test.txt");
  while (<FILE>) {
        trim  $_, 40;  # Trim every line of test.txt to 40 characters
        strim $_, "#"; # Get rid of comments
  }

DESCRIPTION

This module provides several simple, small and fast functions for processing strings.

EXPORT

trim (i<$string>, i<$num>) Trims a string to a certain length, specified by $num.

strim (i<$string>, i<$delim>) Trims a string to whatever is before another string, specified by $delim.

dismantle (i<$string>) Returns an array; the first element is the length of $string, followed by each character of $string, one per element.

AUTHOR

Lincoln Ombelets, <ch.animalbar@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Lincoln Ombelets

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.