Download the PHP package ferryhopper/php-string-formatter without Composer
On this page you can find all versions of the php package ferryhopper/php-string-formatter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download ferryhopper/php-string-formatter
More information about ferryhopper/php-string-formatter
Files in ferryhopper/php-string-formatter
Download ferryhopper/php-string-formatter
More information about ferryhopper/php-string-formatter
Files in ferryhopper/php-string-formatter
Vendor ferryhopper
Package php-string-formatter
Short Description A simple and configurable string formatting pipeline for PHP.
License MIT
Package php-string-formatter
Short Description A simple and configurable string formatting pipeline for PHP.
License MIT
Please rate this library. Is it a good library?
Informations about the package php-string-formatter
php-string-formatter
A simple and configurable string formatting pipeline for PHP.
Define formatting rules using a compact, readable DSL like:
This library lets you manipulate strings in a declarative and reusable way โ ideal for formatting ticket numbers, codes, IDs, or any value that needs structured transformation.
๐ Installation
๐งช Usage
๐ Supported Formatters
| Formatter | Description |
|---|---|
padLeft:length:char |
Left-pads the string to length using char. |
padRight:length:char |
Right-pads the string to length using char. |
replace:search:replace |
Replaces all occurrences of search with replace. |
remove:target |
Removes all occurrences of target. |
padAfterFirst:length:char |
Pads the part after the first character to length using char. |
๐ค Special Keywords
- Use
"space"instead of a literal space character.replace:_:spaceโ replaces_with a spaceremove:spaceโ removes all spaces
๐งช Testing
๐ฆ Roadmap Ideas
- Custom formatter registration
- Support for named pipelines
- Optional error handling modes (fail-fast vs silent)
๐จโ๐ป Authors
Maintained by the Ferryhopper engineering team.
Initial development by @vlahanas.
๐ License
MIT โ see LICENSE for details.
All versions of php-string-formatter with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.1
The package ferryhopper/php-string-formatter contains the following files
Loading the files please wait ...