Lenny4 / php-swtich-case

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch string between: camel case, snake case, kebab case, pascal case

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.

About

License:MIT License


Languages

Language:PHP 100.0%