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.
composer require aydin-hassan/strip-indent
<?php
use function AydinHassan\stripIndent;
$multiLineString = '
<VirtualHost>
<one>
<two>
</two>
</one>
</VirtualHost>
';
echo stripIndent($line);
/**
<VirtualHost>
<one>
<two>
</two>
</one>
</VirtualHost>
**/