PHPackages                             exeque/php-dedent - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. exeque/php-dedent

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

exeque/php-dedent
=================

String dedent for PHP

0.2(1y ago)0461MITPHPPHP ^8.0

Since Mar 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ExeQue/php-dedent)[ Packagist](https://packagist.org/packages/exeque/php-dedent)[ RSS](/packages/exeque-php-dedent/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (1)

PHP Dedent
==========

[](#php-dedent)

Dedent is a simple PHP library that removes leading whitespace from a string. It is useful for removing indentation from multi-line strings.

Installation
------------

[](#installation)

You can install Dedent using Composer:

```
composer require exeque/php-dedent
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

Dedent can be used through the `Dedent` class or the `dedent` function.

```
use Exeque\Dedent\Dedent;

$output = Dedent::dedent($input);
// or
$output = dedent($input);
```

```
use Exeque\Dedent\Dedent;

$input =
