Change int and float value to Chinese numeral format string
Project description
cnum
cnum is a Python library for changing int and float value to Chinese numeral format string.
Chinese numeral format is adopted following languages:
- Japanese
- Simplified Chinese
- Traditional Chinese
- Korean
For each languages
Installation
Use the package manager pip to install foobar.
pip install cnum
Usage
import cnum
# returns Japanese styled numeral string.
cnum.jp(123456789.123456789)
'1億2345万6789 1分2厘3毛4糸5忽'
# returns simplified Chinese styled numeral string.
cnum.scn(123456789.12345)
'1亿2345万6789 1分2厘3毫4丝5忽'
# returns traditional Chinese styled numeral string.
cnum.tcn(123456789.12345)
'1億2345萬6789 1分2厘3毫4絲5忽'
# returns Korean styled numeral string.
cnum.kr(123456789.12345)
'1억2345만6789 1分2厘3毛4糸5忽'
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cnum-0.0.1.tar.gz
(3.6 kB
view details)
Built Distribution
cnum-0.0.1-py3-none-any.whl
(3.5 kB
view details)
File details
Details for the file cnum-0.0.1.tar.gz
.
File metadata
- Download URL: cnum-0.0.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15a2b534e742b89305827f4feb3f0b57711a6966f033e546188287334b18b776 |
|
MD5 | 8c1cc6a0ecf062fd00c9d84ed590750c |
|
BLAKE2b-256 | 9150e5b73dcd14dd1822254b4919eee94f634f36ec63bfa47683cabeb97dcfb8 |
File details
Details for the file cnum-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: cnum-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be2d9ff259779c5889899f9cce24d0c8c9bdeb04c548ba15252caed9873f2a6e |
|
MD5 | dafe5db391d3f70af12bce5d2cc9e4ac |
|
BLAKE2b-256 | 61aa73400f7d9e6c6224acb6fda04fb532f5ebb40aa388b829088fc58dd6fe7d |