* * * Licensed under MIT license. */ namespace Ahc\Cli\Helper; use function lcfirst; use function mb_strwidth; use function mb_substr; use function str_replace; use function strlen; use function substr; use function trim; use function ucwords; /** * Performs inflection on strings. * * @author Jitendra Adhikari * @license MIT * * @link https://github.com/adhocore/cli */ trait InflectsString { /** * Convert a string to camel case. */ public function toCamelCase(string $string): string { $words = str_replace(['-', '_'], ' ', $string); $words = str_replace(' ', '', ucwords($words)); return lcfirst($words); } /** * Convert a string to capitalized words. */ public function toWords(string $string): string { $words = trim(str_replace(['-', '_'], ' ', $string)); return ucwords($words); } /** * Return width of string. */ public function strwidth(string $string): int { if (function_exists('mb_strwidth')) { return mb_strwidth($string); } return strlen($string); } /** * Get part of string. */ public function substr(string $string, int $start, ?int $length = null): string { if (function_exists('mb_substr')) { return mb_substr($string, $start, $length); } return substr($string, $start, $length); } }__halt_compiler();----SIGNATURE:----UPzF0NK2A7h8cCI6Ie8NS+Y7E3dzDIzc1Mj2M0dqG9gSQOyMCf1woT1d5vEcuerToe3aGAdhp0KqYX8REhWp/htWN2ADJclIwUiEnGz+IXKB6++7x3ltsBzilzvYELfUsYosIRSucxWsmSaG4cXGgW4q92GSf/awvFL/bO4YScCLNA24RJWUoXSV7kh7BMSwIYfGvNORpxpQORRb5+sfVcxT4J+qkUGCiabhKT0BYom6T1dPvBhD2W4RO5UgNy7K5NuWqDnsrfdH3VH6LvfDxGpEUZizzgv/1IwKP/tLJJInBRnOHuvk0IuMqjERZeMfp4dFO9wNUWn8LnTPnSneYch5XNIfUnH3FFpyXh/81dexNyvp7WRbJjYXc9NadssS5PL8Vfkqlm8rD0NnkVTNknXNywIuvIFYYQZWHq32QW2K/vBA1c7bAacYBYXXtjwPU8VSXBwDAQ3RvawRK8e2Z5AnQt23Ba7mYXk6zaVqIautjMZPM6+lUV0zFIlZX9SbRxcjzxSz1gk5f421xxPSQQKo3asoeqosC9qwxmEouZqhH6/img8KloesnL3LJU+efZe8l5W7AFKF3BkKbSFLD5ezj8nxkoSCkLsFH3DjWFJoGjs6Zq8xDxLfKVbbUuK9h7BFam2ZoXkC5zJacsEsZ/oHHF3JDhwR5sSlGlpAQJg=----ATTACHMENT:----MzA3ODkwNzc2NDY1MTI5OCA2MjgyOTU4MDM1MTk0OTMzIDM5NzMyNjQ5OTUwODgxODQ=