dev-master
9999999-devPackage to convert strings between different cases
MIT
The Development Requires
by Iain Earl
v1.0.0
1.0.0.0Package to convert strings between different cases
MIT
The Development Requires
by Iain Earl
Wallogit.com
2017 © Pedro Peláez
Package to convert strings between different cases
PHP Package to convert strings between cases, (*2)
Pull in the composer package using the following command:, (*3)
composer require synapse/case-convert
Then import and use the Str class., (*4)
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:, (*5)
Str::convert('example-test-string')->toPlainSentence(); // "Example test string"
Package to convert strings between different cases
MIT
Package to convert strings between different cases
MIT