Skip to content
The missing PHP string library
Find file
New pull request
Latest commit f6e61b8 @kemo Merge pull request #1 from kemo/evolve
Evolve - rewrite
Failed to load latest commit information.
src/Kemo/Strings More test coverage
tests More test coverage
phpunit.xml Adding Proper tests

PHP string object class

The missing PHP string library


This will make living with PHP strings easier by;

  • providing a simple chained API to string operations
  • not mixing up the needle haystack stuff
  • allowing you to extend and add your own methods in seconds
$text = 'Something to translate';
$text = strtr($text, $translation);
$text = htmlspecialchars($text);
$text = nl2br($text);
echo $text;

Str objects allow you this;

echo (new Str('Something to translate'))
Something went wrong with that request. Please try again.