2017 © Pedro Peláez
 

library str-case-converter

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

image

nayjest/str-case-converter

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

  • Saturday, June 30, 2018
  • by nayjest
  • Repository
  • 2 Watchers
  • 10 Stars
  • 82,915 Installations
  • PHP
  • 9 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 2 Versions
  • 8 % Grown

The README.md

nayjest/str-case-converter

Latest Stable Version Scrutinizer Code Quality Build Status Code Coverage, (*1)

Library for converting strings from camel case to snake case and vice versa., (*2)

Installation

The recommended way of installing the library is through Composer., (*3)

Run following command:, (*4)

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., (*5)

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:, (*6)

phpunit

License

© 2015—2023 Vitalii Stepanenko, (*7)

Licensed under the MIT License., (*8)

Please see License File for more information., (*9)

The Versions

30/06 2018

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

  • php >=5

 

The Development Requires

by Vitalii Stepanenko

04/06 2015

v1.0.0

1.0.0.0

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

  Sources   Download

MIT

The Requires

  • php >=5

 

The Development Requires

by Vitalii Stepanenko