PHP code example of stein197 / caser
1. Go to this page and download the library: Download stein197/caser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stein197 / caser example snippets
use Stein197\Caser\Casing;
use function Stein197\Caser\convert;
use function Stein197\Caser\split;
convert('camelCase', Casing::Pascal); // 'CamelCase'
convert('PascalCase', Casing::Kebab); // 'pascal-case'
split("backgroundColor"); // ['background', 'Color']
Casing::Camel; // camelCase
Casing::Header; // Header-Case
Casing::Kebab; // kebab-case
Casing::Pascal; // PascalCase
Casing::Snake; // snake_case
Casing::Upper; // UPPER_CASE