jlinn / caseformat
A PHP case formatting tool inspired by Google Guava's CaseFormat.
1.0.0
2014-02-20 23:51 UTC
Requires
- php: >=5.3.2
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-11-09 15:17:35 UTC
README
A PHP case formatting tool inspired by Google Guava's CaseFormat.
Installation Using Composer
Assuming composer.phar is located in your project's root directory, run the following command:
php composer.phar require jlinn/caseformat:~1.0
Usage
The following case formats are supported:
Conversion from LOWER_UNDERSCORE
to UPPER_CAMEL
, for example, is done like so:
use CaseFormat\CaseFormat; $converted = CaseFormat::LOWER_UNDERSCORE("test_string")->to(CaseFormat::UPPER_CAMEL);
In the example above, the value of $converted
would be "TestString"
.