dev-master
9999999-devAligns and rebalances plain text multiline strings around a delimiter.
GPL-2.0+
The Development Requires
Wallogit.com
2017 © Pedro Peláez
Aligns and rebalances plain text multiline strings around a delimiter.
Aligns and rebalances plain text multiline strings around a delimiter., (*1)
In short, it turns this:, (*2)
one: 1 two: 2 three: 3
into this:, (*3)
one: 1 two: 2 three: 3
Install using Composer by running the following in your project directory:, (*4)
$ composer require goblindegook/delimiter-align
string delimiter_align ( string $string [, string $delimiter ] [, array $options ] );
Aligns and rebalances plain text multiline strings around a delimiter., (*5)
stringMultiline string to align., (*6)
delimiterBoundary string to align around. (Optional, defaults to :.), (*7)
optionsAlignment options:, (*8)
| Option | Description | Default |
|---|---|---|
before |
String prepended to the padded delimiter. | (empty) |
after |
String appended to the padded delimiter. | ' ' |
pad |
Padding character. | ' ' |
right |
Align the delimiter by placing padding on the left. | false |
Returns the string aligned around the provided delimiter., (*9)
Aligns and rebalances plain text multiline strings around a delimiter.
GPL-2.0+