Indent::Utils - Utilities for Indent classes.
use Indent::Utils qw(line_size_check reduce_duplicit_ws remove_first_ws remove_last_ws remove_ws string_len); line_size_check($object_with_line_size_parameter); reduce_duplicit_ws(\$string); remove_first_ws(\$string); remove_last_ws(\$string); remove_ws(\$string); my $length_of_string = string_len($string);
TAB_LENGTH
Default length of tabelator is 8 chars.
line_size_check($object_with_line_size_parameter)
Line size 'line_size' parameter check.
reduce_duplicit_ws($string_sr)
Reduce duplicit blank space in string to one space.
remove_first_ws($string_sr)
Remove blank characters in begin of string.
remove_last_ws($string_sr)
Remove blank characters in end of string.
remove_ws($string_sr)
Remove white characters in begin and end of string.
string_len($string)
Gets length of string.
line_size_check(): 'line_size' parameter must be a positive number. 'line_size', %s
use strict; use warnings; use Indent::Utils qw(reduce_duplicit_ws); my $input = 'a b'; reduce_duplicit_ws(\$input); print "$input|\n"; # Output: # a b|
use strict; use warnings; use Indent::Utils qw(remove_first_ws); my $input = ' a'; remove_first_ws(\$input); print "$input|\n"; # Output: # a|
use strict; use warnings; use Indent::Utils qw(remove_last_ws); my $input = 'a '; remove_last_ws(\$input); print "$input|\n"; # Output: # a|
use strict; use warnings; use Indent::Utils qw(remove_ws); my $input = ' a '; remove_ws(\$input); print "$input|\n"; # Output: # a|
use strict; use warnings; use Indent::Utils qw(string_len); # Print string length. print string_len("\tab\t")."\n"; # Output: # 18
Error::Pure, Exporter, Readonly.
Class for indent handling.
Class for block indenting.
Class for data indenting.
Class for text indenting.
Class for word indenting.
https://github.com/tupinek/Indent
Michal Josef Špaček mailto:skim@cpan.org
http://skim.cz
© 2005-2018 Michal Josef Špaček BSD 2-Clause License
0.05
To install Indent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Indent
CPAN shell
perl -MCPAN -e shell install Indent
For more information on module installation, please visit the detailed CPAN module installation guide.