Download the PHP package realodix/change-case without Composer
On this page you can find all versions of the php package realodix/change-case. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download realodix/change-case
More information about realodix/change-case
Files in realodix/change-case
Package change-case
Short Description Convert strings between camelCase, PascalCase, Headline Case, snake_case and more.
License MIT
Homepage https://github.com/realodix/change-case
Informations about the package change-case
Change Case
Transform a string between
camelCase,PascalCase,Headline Case,snake_case,param-case,CONSTANT_CASEand others.
Installation
You can install the package via composer:
Usage
Methods Available
camelCaseCONSTANT_CASEdot.caseHeader-CaseHeadline Casekebab-caseno casePascalCasepath/caseSentence casesnake_caseswapCase
Options
Every method that gets 💡 flag, they can support option
delimiter: (string) This character separates each chunk of data within the text string. Default: singgle space.splitRx: (RegExp) Used to split into word segments.stripRx: (RegExp) Used to remove extraneous characters.separateNum: (bool) Used to separate numbers or not. Default: false.apostrophe: (bool) Used to separate apostrophe or not. Default: false.
Examples
camelCase
Transform into a string with the separator denoted by the next word capitalized.
💡 Support options
CONSTANT_CASE
Transform into upper case string with an underscore between words.
dot.case
Transform into a lower case string with a period between words.
💡 Support options
Header-Case
Transform into a dash separated string of capitalized words.
💡 Support options
Headline Case
Transform a strings delimited by casing, hyphens, or underscores into a space delimited string with each word's first letter capitalized.
kebab-case
Transform into a lower cased string with dashes between words.
💡 Support options
no case
Transform into a lower cased string with spaces between words, and clean up the string from non-word characters.
💡 Support options
PascalCase
Transform into a string of capitalized words without separators.
💡 Support options
path/case
Transform into a lower case string with slashes between words.
💡 Support options
Sentence case
Transform into a lower case with spaces between words, then capitalize the string.
💡 Support options
snake_case
Transform into a lower case string with underscores between words.
💡 Support options
swapCase
Transform a string by swapping every character from upper to lower case, or lower to upper case.
License
The MIT License (MIT). Please see License File for more information.
All versions of change-case with dependencies
ext-mbstring Version *
symfony/options-resolver Version ^6.1 || ^7.0 || ^8.0
symfony/polyfill-php84 Version ^1.37