aydin-hassan / strip-indent
A tiny library for stripping indents from multi-line scripts, inspired by: (sindresorhus/strip-indent)[https://github.com/sindresorhus/strip-indent]
1.0.0
2014-10-13 21:31 UTC
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: ~4.1
- satooshi/php-coveralls: ~0.6
- squizlabs/php_codesniffer: 1.4.*
This package is auto-updated.
Last update: 2024-11-12 20:44:45 UTC
README
A tiny library for stripping indents from multi-line scripts, inspired by: sindresorhus/strip-indent
The indent amount is counted for the second row, (not the row containing the string declaration). This indent count is removed from each line.
Installation
Composer
composer require aydin-hassan/strip-indent
Usage
<?php use function AydinHassan\stripIndent; $multiLineString = ' <VirtualHost> <one> <two> </two> </one> </VirtualHost> '; echo stripIndent($line); /** <VirtualHost> <one> <two> </two> </one> </VirtualHost> **/