ujiro2017/fixnames 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ujiro2017/fixnames

最新稳定版本:0.1.1

Composer 安装命令:

composer require ujiro2017/fixnames

包简介

A code snippet that fixes name input by user. It removes spaces and none word characters and set the first letter in each name to upper case. Arguments are passed by referece.

README 文档

README

A PHP based function that fixes user inputted names

Requirements

This library requires PHP version 5.0 and above

Install

It is recommended that you install this library using PHP composer. If you don't have composer installed on your machine you can do so by visiting https://www.getcomposer.org/download and follow the instuctions there.

If composer is already installed in your machine, you can install this package by opening the command line terminal and typing the following

composer require jiro2017/Fixnames

How to use

After installing the package on your directory. include composer autoload on your PHP project by doing the following

require_once "vendor/autoload.php";

Next include the FixNames package by writing the following code on the next line after the require_once code.

use function FixNames\fix_names;

You can make use of the fix_names function by calling the following lines of code

$firstname = " John";
$middlename = "doe ";
$surname = "MIKE";

echo "Unfixed names: $surname $firstname $middlename<br>"; // Unfixed Names: Mike John doe  

fix_names($surname, $firstname, $middlename);

echo "Fixed names: $surname $firstname $middlename"; // Fixed Names: Mike John Doe

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-17