When working on projects I found myself, over time, needing the same string functions over and over again. Things like how to shorten a string but still let it end on entire word, replace the last occurrence of string in a string, …
Instead of keeping these functions in a helper file locally in the project, I made a package out of it. It was a good opportunity to spice it up with bit of OO to make them chainable. An example:
// outputs "MIDDLE"
echo string('StartMiddleEnd')->between('Start', 'End')->toUpper();
You are very welcome to submit pull requests to add functions that you feel are missing. Be sure to include some unit tests to ensure everything working as intended.
Granted, it isn’t the most sexy package in the world, but it sure is handy.