ssolweb/string-morpher

A powerful string manipulation library

Maintainers

Package info

github.com/SSolWEB/string-morpher

Homepage

pkg:composer/ssolweb/string-morpher

Statistics

Installs: 214

Dependents: 1

Suggesters: 0

Stars: 22

Open Issues: 4

v1.1.1 2026-01-24 00:54 UTC

README

String Morpher A powerful and versatile string manipulation library designed for developers who need efficient and intuitive solutions for modifying and masking strings.

Status

Build Status Packagist Version Packagist License

Documentation

To see how to use and more details visit: documentation

You can start installing:

composer require ssolweb/string-morpher

Use:

use SSolWEB\StringMorpher\StringMorpher as SM;

// 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 string
echo $string;
echo $captalizedAlpha;
$json = json_encode(['data' => $pascalCase]);

// or return string primitive string value
echo $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.