* * * 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:----uwZBn1HoGHtvW5cTGNoq7QE9oyQBhVHwh/wT3e9iU3VbUvBu8684wA+3fEX2cIPQ00Y8HKy4wWTjKYYp5PK7NWn19kCQ8LdJ86hVsII4IRFj7ag4FkIBlwiR+KLkXhPc++hNsFjMPkefHzXs8UW4LUvNOZ1lY+/yhhwO94v14Jz4mxOwYjoG9Znnb0nwjy6Tnf5Hb/WOMeSd0H1ZQQWHepeKLi3Z2368NS3FnAt0vjlZDN8mEqZD5c43i2JwiwYs276zLuFVcoizwar3ZhKwFbPhx5m9CqgCXFqN/NtNyihKBipp/Ky1jK3d7FTtNYWw065UOBKjPelxcqRif1gy5BDq3C9rtxH4Mf0JGAcYmPhxQ/1YthguZAwvxOpyZpxee210hghhFHnYqoOUYnKf8R0R6gSEJHHDgWbycKqzaMttxtqyXUQiPKhjLjT4uNdqMyMlzOr4EhuYqARwX7bPUC3U+z1daBWSO1k35TPM01NT0ISkWjX3KNsru+8Frz0cUUruqytC+QmGPEEemgQiC85GKAYb8JKa6huf9PNwVqAPk1x/gfU1C0NSSGIMo0x1MAcGQnb23iuRqMq92iuGXlCC0pTwYCrkAYpRqEfxLvAfx6O7aoX4blY8Q+to35yGy35RciNWPu7YJmS8dJlJh6qSzHDSV/ynq3MHMg0mVUQ=----ATTACHMENT:----Mjc0NzA4ODYzMjAzNjE4NCA3ODg0MjkwNDA3NjI5NjQ0IDY2NTMxMDk4OTI4MjY4ODc=