Releases: ferryhopper/php-string-formatter
Releases · ferryhopper/php-string-formatter
Release list
v0.1.0
🚀 Initial release — v0.1.0
php-string-formatter is a simple and configurable string formatting pipeline for PHP.
It lets you apply formatting rules via a compact DSL, for example:
padLeft:10:0;replace:_:space;padAfterFirst:11:0
✅ Supported formatters
padLeft:length:char— Pads the string on the left to a given length using a character.padRight:length:char— Pads the string on the right to a given length using a character.replace:search:replace— Replaces all occurrences ofsearchwithreplace.remove:target— Removes all occurrences oftarget.padAfterFirst:length:char— Pads the portion after the first character to the given length using a character.
🔤 Special keyword
- Use
"space"to represent a space character (e.g.replace:_:space→ replaces_with a space)
See the README for full usage and examples.