synapse / case-convert
Package to convert strings between different cases
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/synapse/case-convert
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is not auto-updated.
Last update: 2025-10-26 02:34:02 UTC
README
PHP Package to convert strings between cases
Usage
Pull in the composer package using the following command:
composer require synapse/case-convert
Then import and use the Str class.
use Neuron\Str;
$convert = Str::convert('Example test string');
echo $convert->toSnakeCase(); // "example_test_string"
echo $convert->toKebabCase(); // "example-test-string"
echo $convert->toCamelCase(); // "exampleTestString"
echo $convert->toCamelCaseUpperFirstLetter(); // "ExampleTestString"
For one off conversions, you can easily change the to...Case method onto the convert method:
Str::convert('example-test-string')->toPlainSentence(); // "Example test string"