Cyrillic numeral system numbers conversion
Project description
cu-numbers
A program for numbers conversion between Arabic and Cyrillic (further CU) numeral systems.
Background
See Introduction to learn about CU numeral system.
Installation
pip install cu-numbers
Usage
import cunumbers
# Convert an Arabic number to CU
# Requires non-zero int, returns str
a = cunumbers.to_cu(1)
# Convert a CU number to Arabic
# Requires non-empty str, returns int
b = cunumbers.to_arab("а҃")
"Delimiter" and "plain" style numbers are supported in both directions. "Delimeter" style is default for CU-wise conversion.
Several falgs can be used with to_cu()
method:
# CU_PLAIN flag sets conversion to "plain" style
c = cunumbers.to_cu(111111, CU_PLAIN)
# CU_NOTITLO flag omits "titlo" output
d = cunumbers.to_cu(11000, CU_PLAIN | CU_NOTITLO)
# Following flags control dot styling:
#
# CU_ENDDOT - append dot at the end
# CU_WRAPDOT - append dot at both ends
# CU_DELIMDOT - add dot separator between digit groups. Sets conversion to "delim" style
# CU_ALLDOT - combine CU_WRAPDOT and CU_DELIMDOT
Contributing
Create an issue describing a bug or suggestion, then create a pull request mentioning the issue.
Feedback
Drop me a line: amshoor@gmail.com
Changelog
See Changelog.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cu-numbers-1.3.1.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for cu_numbers-1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56d877955fa7ae2d7535e6542c5357e7ce54b126fc1faae917827c3e4dc7e088 |
|
MD5 | 595e5e686975ac21754ee3877ee47238 |
|
BLAKE2b-256 | 712229bbdddf84fab4e8843400d18168275f6479fa42396ce53ff8631744ee6d |