当前位置:网站首页>Turn trendsoft/capital amount of Chinese capital library
Turn trendsoft/capital amount of Chinese capital library
2022-08-02 03:55:00 【phpreturn】
Installation
$ composer require "trendsoft/capital" -vvvExample of usage
If the fractional part is more than 2 digits, it will be rounded up.
( new Money( 0.001 ) )->toCapital(); //zero dollar( new Money( 0.005 ) )->toCapital(); //One point( new Money( 0.01 ) )->toCapital(); //One point( new Money( 0.10 ) )->toCapital(); //One corner( new Money( 0.105 ) )->toCapital(); //One dime( new Money( 0.11 ) )->toCapital(); //One dime( new Money( 0.15 ) )->toCapital(); //one quarter cent( new Money( 1.01 ) )->toCapital(); //One yuan and one cent( new Money( 10.01 ) )->toCapital(); //One hundred and one cents( new Money( 0.09 ) )->toCapital(); // nine points( new Money( 1.0 ) )->toCapital(); //One dollar( new Money( 1.1 ) )->toCapital(); //One dollar and one corner( new Money( 2.0 ) )->toCapital(); //two yuan( new Money( 2.1 ) )->toCapital(); //two yuan and one cornerAlgorithms
Integer part
Example: 10001000
One thousand one thousand one thousand one thousand one thousand yuan
Convert billion, million, leading zeros to trailing
10000000,000,000,000
Remove the units of zero pick, zero hundred, zero thousand
one thousand million yuan
Process zero zero as zero. 2 times (picks, hun, thousand) twice just changed zero zero zero to zero
One million, one thousand and one thousand yuan
One thousand million one thousand yuan
Processing zero
zero billion, zero thousand, zero yuan10,010,000 yuan
Decimal part
Example: 0.75
Zero scoreprocessing as empty
Zero angleprocessing
If there is an integer part, turn zero angle to zero
If there is no integer part, turn zero angleto be empty
Special Handling
For example: 0, 0.00 Return zero element
边栏推荐
- 13. JS output content and syntax
- After the mailbox of the Pagoda Post Office is successfully set up, it can be sent but not received.
- display,visibility,opacity
- Baidu positioning js API
- AES加密的各种蛋疼方式方式
- easyswoole uses redis to perform geoRadiusByMember Count invalid fix
- PHP入门(自学笔记)
- IO stream, encoding table, character stream, character buffer stream
- js basics
- 宝塔邮局邮箱设置成功后能发送不能接收问题处理
猜你喜欢
随机推荐
项目中遇到的问题
[mikehaertl/php-shellcommand] A library for invoking external command operations
每日五道面试题总结 22/7/19
1.6一些今日学习
阿里云MySQL5.7安装以及部分主要问题(总和)
[mikehaertl/php-shellcommand]一个用于调用外部命令操作的库
Batch replace file fonts, Simplified -> Traditional
[league/flysystem] An elegant and highly supported file operation interface
宝塔邮局邮箱设置成功后能发送不能接收问题处理
逍遥多开模拟器ADB驱动连接
二维码生成API接口,可以直接作为A标签连接
kali安装IDEA
New usage of string variable parsing in PHP8.2
多线程(实现多线程、线程同步、生产者消费者)
PHP 发起支付宝支付时 订单信息乱码解决
npm --package.json---require
Solve the problem of Zlibrary stuck/can't find the domain name/reached the limit, the latest address of Zlibrary
IO流、字节流、字节缓冲流
13. JS output content and syntax
微信小程序云开发之模糊搜索








![[league/climate] A robust command-line function manipulation library](/img/ce/39114b1c74af649223db97e5b0e29c.png)
