定制 jabarihunt/format 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

jabarihunt/format

Composer 安装命令:

composer require jabarihunt/format

包简介

Class to hold static formatting helper methods.

关键字:

README 文档

README

This class was developed to hold static formatting helper methods as outlined below...

Getting Started

Prerequisites

  • PHP 7.1 or greater (due to type hinting)

INSTALLING

Via Composer

Run the following command in the same directory as your composer.json file:

php composer.phar require jabarihunt/format

Via Github

  1. Clone this repository into a working directory: git clone git@github.com:jabarihunt/format
  2. Include the Format class in your project...
require('/path/to/Format.php')

...or if using an auto-loader...

 use jabarihunt/Format

USAGE

name(string $name):

Credit for the original method goes to Armand Niculescu.

This method correctly capitalizes names when there are prefixes & suffixes, apostrophes, name parts that shouldn't be capitalized, and in other scenarios where using something like ucwords(strtolower($str)) doesn't work.

Examples:

$name ucwords(strtolower($name)) Format::name($name)
michael o’carrol Michael O’carrol Michael O’Carrol
lucas l’amour Lucas L’amour Lucas l’Amour
george d’onofrio George D’onofrio George d’Onofrio
william stanley iii William Stanley Iii William Stanley III
UNITED STATES OF AMERICA United States Of America United States of America
t. von lieres und wilkau T. Von Lieres Und Wilkau T. von Lieres und Wilkau
paul van der knaap Paul Van Der Knaap Paul van der Knaap
jean-luc picard Jean-luc Picard Jean-Luc Picard
JOHN MCLAREN John Mclaren John McLaren
hENRIC vIII Henric Viii Henric VIII
VAsco da GAma Vasco Da Gama Vasco da Gama

CONTRIBUTING

  1. Fork Repository
  2. Create a descriptive branch name
  3. Make edits to your branch
  4. Squash (rebase) your commits
  5. Create a pull request

LICENSE

This project is licensed under the MIT License - see the LICENSE.md file for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固