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]
Installs: 57
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/aydin-hassan/strip-indent
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: 2025-09-12 22:17:50 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> **/