F# library for operations related to radix conversion. Compatible with Fable.
Version 2.0.0
- Provides functions for working with radix conversion in F#.
- Works in a Fable project.
- .NET Standard 2.0
- .NET 7
- .NET 8
- .NET 9
- Core Contains helper functions for base 10, 2 and 16 radix conversion (.NET wrapper functions).
- Dec
Contains helper functions for base 10 radix conversion (.NET wrapper functions). - Bin
Contains helper functions for base 2 radix conversion (.NET wrapper functions). - Hex
Contains helper functions for base 16 radix conversion (.NET wrapper functions). - Arb
Contains helper functions for radix conversion with an Arbitrary base.
For more information, see the signature file (.fsi
).
.NET CLI,
dotnet add package Fermata.RadixConversion --Version 2.0.0
F# Intaractive,
#r "nuget: Fermata.RadixConversion, 2.0.0"
For more information, please see Fermata on NuGet Gallery.
Dec
,Bin
andHex
discriminated unions are now inplemented as single case discriminated unions, while they used to be multi case DU, holding two casesValid
andInvalid
.- New helper functions
dec
,bin
andhex
are added. These functions takes a value (able to convert toint
) and convert it toDec
,Bin
andHex
. A conversionDec.Valid 42 |> Dec.toBin
now can be writtenDec 42 |> bin
(the older functions are still left). This change doesn't replace anything, nothing is abolished. But in some cases, this change might cause some trouble if your code includes values named "dec", "bin" and "hex" because those values will overwrite the newly added functions.
Hex.validate
returns the input hexadecimal representation in lower case, while it used to return the input value in upper case or in lower case according to the input.- .NET 6.0 is no longer supported.
Bin.validate
andHex.validate
return the input binary number representation or hexadecimal representation without leading zeros, while they used to return the input value with leading zeros.
- Functions in the module contains the built-in exceptions on failure, while they used to contain
Fermata.Exceptions
.
This product is licensed under the MIT license.