Skip to content

LGMRomanNumber is an iOS library to convert arabic numbers to/from roman numbers.

License

Notifications You must be signed in to change notification settings

lludo/LGMRomanNumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LGMRomanNumber

LGMRomanNumber is an iOS library to convert arabic numbers to/from roman numbers.

Description

This library provides a convinient way to convert arabic numbers to roman numbers and vice versa. It also validates that the input values are valid and throws exceptions if not. All the rules and specific cases are applied when converting to roman numbers, see Wikipedia for more details. Converting arabic values in interval [1, 4000] or roman numbers in interval [I, MMMM];

Usage

You just have to #import "LGMRomanNumber.h" to be able to use it.

NSString *romanNumber = [LGMRomanNumber romanFromArabic:1986];
// romanNumber value is MCMLXXXVI

NSUInteger arabicNumber = [LGMRomanNumber arabicFromRoman:@"MMXIII"];
// arabicNumber value is 2013

Credits

LGMRomanNumber was created by Ludovic Landry.

Creator

Ludovic Landry
@ludoviclandry

License

LGMRomanNumber is available under the MIT license. See the LICENSE file for more info.

About

LGMRomanNumber is an iOS library to convert arabic numbers to/from roman numbers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published