Numerus
v2.0.0
Roman numerals conversion and manipulation C library.
|
Numerus is a comprehensive C library that allows conversion and manipulation of roman numerals - now with it's own shell.
Roman numerals are the numeric system used in ancient Rome based on combinations of letters from the Latin alphabet to signify values. Wikipedia has a nice article on them.
This library allows you to convert roman numerals to values and values to roman numerals, adds some extensions to them to support big and float values that other converters of the same kind usually don't, focuses on optimization, clean code and error handling. Also offers a Numerus shell to convert values on-the-fly or by pipelining (on Unix-like OS) without the need to incorporate the library in an existing project.
For a shorter explanation on how roman numerals works in Numerus and what Numerus supports, check the Numerus syntax page.
Download a zip/tarball of the library and unpack it or clone the repository. On a Unix-like OS, you can also use the command line with:
Then, if you desire to just use Numerus directly with its build-in command line interface (CLI) without incorporating it into an existing project, compile it with cmake
and run it. On a Unix-like OS, do it with the following one-liner in the Numerus root folder:
help
command in the CLI for assistanceTo use it as a library, add it to your project, include the Numerus header file and you're good to go!
You'll probably need the conversion functions: those are the first 6 functions in the Numerus header file. Check the Numerus usage examples for a quick tutorial on how to use Numerus and the Numerus syntax page for rules on how to write roman numerals and why Numerus uses some strange names such as long numeral. Everything else, including functions, parameters, constant and error codes is explained in the web documentation (thanks Doxygen!).
Nobody is probably going to need YET another roman numerals conversion tool. Numerus was created:
Numerus is released under the BSD 3-clause license which basically allows you to do anything with it as long as you credit the original author (more or less).
Matjaž Guštin dev@m atja z.itmatjaz.it. For any suggestions please contact me.
Numerus is a port of my (not-really-as-complete-as-this-one but functioning) project with the same name in Java.
The inspirations for the conversion functions were:
The SQLite3 library offered many ideas on keeping the code clean and creating a nice API.