LinkeEngineering.NumeriRomani
1.1.3
dotnet add package LinkeEngineering.NumeriRomani --version 1.1.3
NuGet\Install-Package LinkeEngineering.NumeriRomani -Version 1.1.3
<PackageReference Include="LinkeEngineering.NumeriRomani" Version="1.1.3" />
<PackageVersion Include="LinkeEngineering.NumeriRomani" Version="1.1.3" />
<PackageReference Include="LinkeEngineering.NumeriRomani" />
paket add LinkeEngineering.NumeriRomani --version 1.1.3
#r "nuget: LinkeEngineering.NumeriRomani, 1.1.3"
#:package LinkeEngineering.NumeriRomani@1.1.3
#addin nuget:?package=LinkeEngineering.NumeriRomani&version=1.1.3
#tool nuget:?package=LinkeEngineering.NumeriRomani&version=1.1.3
Numeri Romani
A modern .NET library for converting and validating Roman numerals in your applications.
Installation
Install Numeri Romani using the NuGet Package Manager.
Restrictions
The library currently supports integers in the range from 0 to 499,999.
Features
Format Integers as Roman Numerals
Option 1: Extension method for int
Use the ToRoman() extension method to easily convert an integer to its Roman numeral representation:
using LinkeEngineering.NumeriRomani;
int number = 123;
string roman = number.ToRoman();
// assigns "CXXIII"
Option 2: Using RomanNumeralsFormatter
For advanced formatting, use the RomanNumeralsFormatter with String.Format(). Supported format strings are: empty, "g", "G", or "R".
using LinkeEngineering.NumeriRomani;
int number = 123;
RomanNumeralsFormatter formatter = new();
string roman = String.Format(formatter, "{0:R}", number);
// assigns "CXXIII"
Parse Roman Numerals to Integers
Option 1: Parsing With ParseRoman()
Use the extensions method ParseRoman() to convert a Roman numeral string to its integer value:
using LinkeEngineering.NumeriRomani;
string roman = "CXXIII";
int number1 = roman.ParseRoman()
// assigns 123
Option 2: Safe Parsing With TryParseRoman()
Use the extension method TryParseRoman() to safely parse a Roman numeral string to its integer value:
using LinkeEngineering.NumeriRomani;
string roman = "CXXIII";
bool isSuccess = roman.TryParseRoman(out int number);
// returns true and assigns 123 to number
License
This library is licensed under the MIT License, with additional terms restricting the use of the original package name for modified versions. Please refer to the license file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on LinkeEngineering.NumeriRomani:
| Package | Downloads |
|---|---|
|
LinkeEngineering.CalendrierRepublicain
A .NET 8 library for converting, calculating, and formatting dates in the French Republican calendar. Includes a custom calendar implementation and formatter for seamless integration with .NET date and time APIs. |
GitHub repositories
This package is not used by any popular GitHub repositories.