synapse/case-convert
Composer 安装命令:
composer require synapse/case-convert
包简介
Package to convert strings between different cases
README 文档
README
PHP Package to convert strings between cases
Usage
Pull in the composer package using the following command:
composer require synapse/case-convert
Then import and use the Str class.
use Neuron\Str;
$convert = Str::convert('Example test string');
echo $convert->toSnakeCase(); // "example_test_string"
echo $convert->toKebabCase(); // "example-test-string"
echo $convert->toCamelCase(); // "exampleTestString"
echo $convert->toCamelCaseUpperFirstLetter(); // "ExampleTestString"
For one off conversions, you can easily change the to...Case method onto the convert method:
Str::convert('example-test-string')->toPlainSentence(); // "Example test string"
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-10