Ada.Numbers
1.0.0
See the version list below for details.
dotnet add package Ada.Numbers --version 1.0.0
NuGet\Install-Package Ada.Numbers -Version 1.0.0
<PackageReference Include="Ada.Numbers" Version="1.0.0" />
paket add Ada.Numbers --version 1.0.0
#r "nuget: Ada.Numbers, 1.0.0"
// Install Ada.Numbers as a Cake Addin #addin nuget:?package=Ada.Numbers&version=1.0.0 // Install Ada.Numbers as a Cake Tool #tool nuget:?package=Ada.Numbers&version=1.0.0
Ada.Numbers
Features:
- It converts a number to its equivalent in written words, i.e. 123 to "cento e vinte três";
- It converts a word to its equivalent in number, i.e. "cento e vinte dois" to "122".
Specification
Available namespaces are:
Ada.Numbers.Converters
which contains the extension methods for conversion;Ada.Numbers.Constants
which contains the constants used in conversions;Ada.Numbers.Utilities
which contains some useful methods such as the number of digits and the category of the number.
Ada.Numbers.Converters
For string
, there method is .ToNumber(useShortScale)
. useShortScale
is a boolean whose default
value is false
.
Example:
var number = "vinte e dois";
number.ToNumber() // > "22"
Check the method documentation for more details.
For numerical types (long, int, byte, decimal, double and float
), the method is .ToWords(useShortScale)
. useShortScale
is a boolean whose default
value is false
.
var number = 22;
number.ToNumber() // > "Vinte e Dois"
Check the method documentation for more details.
Ada.Numbers.Constants
It includes the classes:
Messages
: for useful messages, check the class documentation for more details.Separators
: for number separator, check the class documentation for more details.
Ada.Numbers.Utilities
It includes extension methods for:
.NumberOfDigits()
available forlong, int and byte
: it returns the number of digits a number has.
var number = 22;
number.NumberOfDigits() // > 2
.Category()
available forlong, int and byte
: it returns the the category of the number.
var number = 22;
number.Category() // > NumberCategory.Ten
NumberCategory
is an enum, check its documentation for more details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.