ghostwriter/case-converter
最新稳定版本:2.2.0
Composer 安装命令:
composer require ghostwriter/case-converter
包简介
Convert strings from and to AdaCase, CamelCase, CobolCase, KebabCase, Lowercase, MacroCase, PascalCase, SentenceCase, SnakeCase, TitleCase, TrainCase, and Uppercase
关键字:
README 文档
README
Convert strings from and to AdaCase, CamelCase, CobolCase, KebabCase, Lowercase, MacroCase, PascalCase, SentenceCase, SnakeCase, TitleCase, TrainCase, and Uppercase.
Installation
You can install the package via composer:
composer require ghostwriter/case-converter
Star ⭐️ this repo if you find it useful
You can also star (????) this repo to find it easier later.
Usage
use GhostWriter\CaseConverter\CaseConverter; $string = 'The quick, brown fox jumps over the lazy dog.'; // $caseConverter = new CaseConverter(); // or $caseConverter = CaseConverter::new(); // The_Quick_Brown_Fox_Jumps_Over_The_Lazy_Dog $caseConverter->toAdaCase($string); // theQuickBrownFoxJumpsOverTheLazyDog $caseConverter->toCamelCase($string); // THE-QUICK-BROWN-FOX-JUMPS-OVER-THE-LAZY-DOG $caseConverter->toCobolCase($string); // the.quick.brown.fox.jumps.over.the.lazy.dog $caseConverter->toDotCase($string); // the-quick-brown-fox-jumps-over-the-lazy-dog $caseConverter->toKebabCase($string); // the quick brown fox jumps over the lazy dog $caseConverter->toLowerCase($string); // THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG $caseConverter->toMacroCase($string); // TheQuickBrownFoxJumpsOverTheLazyDog $caseConverter->toPascalCase($string); // The quick brown fox jumps over the lazy dog $caseConverter->toSentenceCase($string); // the_quick_brown_fox_jumps_over_the_lazy_dog $caseConverter->toSnakeCase($string); // The Quick Brown Fox Jumps Over The Lazy Dog $caseConverter->toTitleCase($string); // The-Quick-Brown-Fox-Jumps-Over-The-Lazy-Dog $caseConverter->toTrainCase($string); // THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG $caseConverter->toUpperCase($string);
Credits
Changelog
Please see CHANGELOG.md for more information on what has changed recently.
License
Please see LICENSE for more information on the license that applies to this project.
Security
Please see SECURITY.md for more information on security disclosure process.
统计信息
- 总下载量: 2.99M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 10
- 推荐数: 0
其他信息
- 授权协议: BSD-4-Clause
- 更新时间: 2026-01-04