drrcknlsn/number-converter 问题修复 & 功能扩展

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

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

drrcknlsn/number-converter

Composer 安装命令:

composer require drrcknlsn/number-converter

包简介

A tool to convert numbers to their written lingual form.

README 文档

README

NumberConverter is a simple interface for converting numbers from their numeric representations into their written, lingual representations. Other, probably better solutions already exist (see below), and this was created only as a coding exercise.

Example

$converter = new DrrckNlsn\NumberConverter\EnglishNumberConverter();
echo $converter->convert(1234567);

Output:

one million two hundred thirty four thousand five hundred sixty seven

Internationalization

Currently, there is only an EnglishNumberConverter implementation, but the project was created with other languages in mind.

Demo

This package comes with a simple CLI binary for demonstrating the EnglishNumberConverter class, located at bin/convertNumber.

Installing via Composer

The recommended way to install NumberConverter is via Composer:

composer require drrcknlsn/number-converter

After installing the dependency, you will need to require Composer's autoloader:

require 'vendor/autoload.php';

Existing Solutions

The intl extension provides the NumberFormatter class, which can be used to accomplish the same goal, using NumberFormatter::SPELLOUT.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固