yhoiseth/stringy-inflector
Composer 安装命令:
composer require yhoiseth/stringy-inflector
包简介
A PHP library that helps you capitalize personal names
README 文档
README
A PHP library that helps you capitalize personal names. Extends Stringy, a PHP string manipulation library with multibyte support.
Personal names such as "Marcus Aurelius" are sometimes typed incorrectly using lowercase ("marcus aurelius").
Capitalizing "marcus aurelius" is a simple task. But some names are less simple. Consider "Zeno of Citium". If you have the string "zeno of citium", you should capitalize "zeno" and "citium", but not "of".
StringyInflector helps you capitalize personal names by checking against a list of special cases that shouldn't be capitalized. If the name is in the list, it isn't capitalized.
Installation
composer require yhoiseth/stringy-inflector
Usage
<?php use StringyInflector\StringyInflector as S; $stringy = S::create('zeno of citium'); echo $stringy->capitalizePersonalName(); // 'Zeno of Citium'
统计信息
- 总下载量: 4.42k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-06