Skip to main content

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

MIT

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.6.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

cnum-0.0.6-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file cnum-0.0.6.tar.gz.

File metadata

  • Download URL: cnum-0.0.6.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for cnum-0.0.6.tar.gz
Algorithm Hash digest
SHA256 fb433ba7c6c38ac37010111c3eebb63d74e405ba4c9c27fa718d4b047cb198d0
MD5 d4125d0852767bd28a96636a901f4f2e
BLAKE2b-256 12d9c39c9fada73ec607c2b9b869335e52068d29350572d3da990a76c0b4a450

See more details on using hashes here.

File details

Details for the file cnum-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: cnum-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for cnum-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 65aebc435b99c1f50e697b9769da77f060b4fe2f1059c3d98fdf2713f62e2a37
MD5 1a6beb884d04b68e92d46f321d6d2a9b
BLAKE2b-256 723ef9e667b72f6374033f4b5846acf4982ae2b9b14466339c44f095aae3cec3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page