lenny4/php-swtich-case

Switch string between (camel case, snake case, kebab case, pascal case, upper case)

Fund package maintenance!
Lenny4

v1.0.1 2022-02-04 16:11 UTC

README

Installation

You can install the package via composer:

composer require lenny4/php-swtich-case

Usage

$newString = Lenny4\SwtichCase::change('myStringInCamel', Lenny4\SwtichCase::KEBAB_CASE); // my-string-in-camel

Available cases:

  • Lenny4\SwtichCase::CAMEL_CASE
  • Lenny4\SwtichCase::SNAKE_CASE
  • Lenny4\SwtichCase::KEBAB_CASE
  • Lenny4\SwtichCase::PASCAL_CASE

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

You can launch this command to automatically create test if you create a new Case:

php src/generate-test.php

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.