承接 vorgas/proper-naming 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

vorgas/proper-naming

Composer 安装命令:

composer require vorgas/proper-naming

包简介

Tools for correcting capitalization on various proper names

README 文档

README

An advanced and extensible proper name casing strategy

Turns MIKE HILL into Mike Hill, and ANGUS MACGUYVER into Angus MacGuyver. And if somebody types in John MacDonald and Ian Macloud, it figures they know what they are doing, and leaves the capitalization the way it was submitted.

With proper usage, it will not only turn angel d'arcy into Angel D'Arcy but knows to leave well enough alone and make HELL'S BELLS into Hell's Bells.

Features At A Glance

  • Different strategies for people and places
  • Adjustable in real time through public properties
  • Force words to all upper or all lower case
  • Detect properly formatted overrides on edge cases
  • Callable objects for cleaner code

Installation

From within your project...

# composer require vorgas/proper-naming:dev-main

Basic Usage

Just call the appropriate class with the string to case.

use ProperNaming\PeopleCasing;
$ProperName = new PeopleCasing();
$ProperName('MIKE HILL'); # Mike Hill
$ProperName('rip van winkle'); # Rip van Winkle
$ProperName('van trapp'); # Van Trapp <-- A person's actual name
$ProperName('van trapp', false); # van Trapp <-- The family name
$ProperName('john smith iii'); # John Smith III

Casing Strategies

Other Topics

Acknowledgement

The logic behind the delimiter array was freaking genius. I also kept his original case force exceptions, but added some extras.

License

Licensed under the MIT License - see the License for details

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固