mouson / chinese-numerals
阿拉伯數字轉換中文數字工具 PHP Arabic numerals converted to Chinese numerals tools.
Installs: 4 614
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >= 5.3
Requires (Dev)
- phpunit/phpunit: ^4.6
This package is auto-updated.
Last update: 2024-10-21 13:39:59 UTC
README
Introduction
The PHP arabic numerals converted to Chinese numerals tools.
Installation
Run this command to add this library to your composer.json
file:
composer require mouson/chinese-numerals
Quick Start Guide
use
use Mouson\Helpers\ChineseNumericHelper;
arabic numerals converted to lower case chinese numerals
$chinese = ChineseNumericHelper::Numeric2Chinese(123); echo $chinese; \\ 一百二十三
arabic numerals converted to upper case chinese numerals
$chinese = ChineseNumericHelper::Numeric2Chinese(123, true); echo $chinese; \\ 壹佰貳拾參
阿拉伯數字轉換為中文數字工具
簡介
一個阿拉伯數字轉換為中文數字的工具。
安裝
執行以下指令將此套件加入到 composer.json
檔案:
composer require mouson/chinese-numerals
使用
引用
use Mouson\Helpers\ChineseNumericHelper;
小寫中文轉換
$chinese = ChineseNumericHelper::Numeric2Chinese(123); echo $chinese; \\ 一百二十三
大寫中文轉換
$chinese = ChineseNumericHelper::Numeric2Chinese(123, true); echo $chinese; \\ 壹佰貳拾參