Skip to content

Repository files navigation

String Morpher, A powerful string manipulation library

String Morpher offers a fluent API, specifically designed for string manipulation, allowing developers to chain multiple methods in a seamless and readable manner. This makes it easy to perform complex string manipulations in a single and concise flow without the need for auxiliary functions or manual manipulation.

Status

Build StatusPackagist VersionPackagist License

Documentation

To see how to use and more details visit: documentation

You can start installing:

composer require ssolweb/string-morpher

Use:

useSSolWEB\StringMorpher\StringMorpherasSM;
// you can chain methods$string = SM::make($string)
->trim()
->replace('fox', 'dog')
->sub(5, 20)
->toLower();
$captalizedAlpha = SM::onlyAlpha($string)
->captalize();
$pascalCase = SM::captalize($string)
->withoutSpaces();
// and use like a stringecho$string;
echo$captalizedAlpha;
$json = json_encode(['data' => $pascalCase]);
// or return string primitive string valueecho$string->getString();

Contributing

Please see the contributing entry for more details.

Credits

Vinicius de Santana

License

The package is open source software licensed under the MIT LICENSE.

About

A powerful string manipulation library

Resources

Contributing

Stars

22 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages