webikevn/wstring is a Laravel package for php string utilities.
It currently has 1 GitHub stars and 13 downloads on Packagist (latest version 1.0.2).
Install it with composer require webikevn/wstring.
Discover more Laravel packages by webikevn
or browse all Laravel packages to compare alternatives.
Last updated
This librairy provides utilities function to ease string manipulation
Install package with composer
composer require webikevn/wstring
In your PHP code, load library
require_once __DIR__ . '/../vendor/autoload.php';
use Webike\WString\WString as WString;
Note: I couldn't use String as namespace because it's a PHP reserved word so it's why namespace is WString ...
Replace the last occurrence of a string
$string = WString::strReplaceLast($search, $replace, $subject);
Checks whether a string starts with given chars
$bool = WString::startsWith($haystack, $needle);
Checks whether a string ends with given chars
$bool = WString::endsWith($haystack, $needle);
phpunit --bootstrap vendor/autoload.php tests
Nguyen Giang visit my website ;)