- SEE ALSO
- COPYRIGHT AND LICENSE
LeftPad - Why should Node.js have all the fun?
use LeftPad; $string = leftpad( $string, $min_length ); $string = leftpad( $string, $min_length, $pad_char );
This module provides left padding, just like you'd find for Node.js.
So that people may depend on this module for their production code, the author commits to never delete it from CPAN.
$string = leftpad( $string, $min_length ); $string = leftpad( $string, $min_length, $pad_char );
Returns a copy of the input string with left padding if the input string length is less than the minimum length. It pads with spaces unless given a pad character as a third argument.
Zero or negative minimum length returns the input string. Only the first character in the pad-character string is used. Undefined warnings are suppressed so an undefined input string is treated as an empty string.
Please report any bugs or feature requests through the issue tracker at https://github.com/dagolden/LeftPad/issues. You will be notified automatically of any progress on your issue.
This is open source software. The code repository is available for public review and contribution under the terms of the license.
git clone https://github.com/dagolden/LeftPad.git
David Golden <firstname.lastname@example.org>
This software is Copyright (c) 2016 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004