定制 nayjest/str-case-converter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nayjest/str-case-converter

最新稳定版本:v1.0.0

Composer 安装命令:

composer require nayjest/str-case-converter

包简介

Library for converting strings from camel case to snake case and vice versa.

README 文档

README

Latest Stable Version Scrutinizer Code Quality Build Status Code Coverage

Library for converting strings from camel case to snake case and vice versa.

Installation

The recommended way of installing the library is through Composer.

Run following command:

composer require nayjest/str-case-converter

Usage

Converting from snake case to camel case

use Nayjest\StrCaseConverter\Str;
...
echo Str::toCamelCase('my-string'); // 'MyString'
echo Str::toCamelCase('one_more_string'); // 'OneMoreString'

Source string may be separated to words using following characters: '-', '_' and space.

Converting from camel case to snake case

use Nayjest\StrCaseConverter\Str;
...
echo Str::toSnakeCase('MyString'); // 'my_string'

// It's possible to use custom delimiter:
echo Str::toSnakeCase('OneMoreString', '-'); // 'one-more-string'

Testing

Run following command:

phpunit

License

© 2015—2023 Vitalii Stepanenko

Licensed under the MIT License.

Please see License File for more information.

统计信息

  • 总下载量: 458.01k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 1
  • 依赖项目数: 14
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-04