Fabricale.Extensions
1.1.0
dotnet add package Fabricale.Extensions --version 1.1.0
NuGet\Install-Package Fabricale.Extensions -Version 1.1.0
<PackageReference Include="Fabricale.Extensions" Version="1.1.0" />
<PackageVersion Include="Fabricale.Extensions" Version="1.1.0" />
<PackageReference Include="Fabricale.Extensions" />
paket add Fabricale.Extensions --version 1.1.0
#r "nuget: Fabricale.Extensions, 1.1.0"
#:package Fabricale.Extensions@1.1.0
#addin nuget:?package=Fabricale.Extensions&version=1.1.0
#tool nuget:?package=Fabricale.Extensions&version=1.1.0
Fabricale Extensions
A library providing extension methods.
This library is still under development and more updates are being released.
Check the Change Log for more information about the deployed changes.
String Extensions
The library provides the following extensions to the string class:
| Method | Purpose |
|---|---|
Find() |
Returns a list with all the locations where the text is found in a string |
MultiReplace() |
Replaces multiple instances of a string in the text |
ContainsOnly() |
Checks whether a string contains only certain characters |
ContainsOnlyNumbers() |
Checks whether a string only contains numbers |
ContainsOnlyAsciiLetters() |
Checks whether a string only contains Ascii letters |
ContainsOnlyAsciiLettersAndNumbers() |
Checks whether a string only contains Ascii letters and numbers |
ConvertToAsciiBooleanArray() |
Generates a boolean array with the ASCII characters inside the given string |
These methods are optimized for performance. The ASCII specific methods use an array of booleans to make the search fast. The Non-ASCII specific methods use a HashSet, which adds the cost of the hashing to the search, but still keep it fast.
The functionality is tested with Unicode characters.
The functions
Find()andMultiReplace()are going to be optimized for better performance in a future release. After running benchmarks, the performance is not much better than just using the traditionalString.Replace()method. When this optimization is deployed, you will not need to execute changes to your code to benefit from it.
When using the ContainsOnly() method, there is a constructor available that accepts a HashSet<char>. If the same characters are used frequently, consider reusing it instead of creating the HashSet on each call.
If you have a specific list of ASCII characters that you want to check, consider using the extension method ConvertToAsciiBolleanArray() to create an array with the acceptable characters, and cache it.
DateTime Extensions
The library provides the following extensions to the string class:
| Method | Purpose |
|---|---|
AddBusinesDays() |
Adds or Subtracts Business Days to a Date |
ToJulian() |
Converts a DateTime into a double representing the Julian Date |
The AddBusinessDays() function will add or subtract days, ignoring weekends. Holidays are not taken into consideration. A future release should include that functionality.
CharComparer
This class offers the option to compare characters.
The following comparers are available:
| Class | Purpose |
|---|---|
CaseSensitiveCharComparer |
This class compare two characters and ensure the casing is taken into consideration |
CaseInsensitiveCharComparer |
This class compares two characters, ignoring the casing |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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 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 is compatible. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- 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.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0 | 104 | 6/8/2026 |
| 1.0.0 | 107 | 6/1/2026 |
| 0.1.0-alpha.3 | 57 | 5/29/2026 |
| 0.1.0-alpha.2 | 72 | 5/29/2026 |
| 0.1.0-alpha.1 | 61 | 5/28/2026 |
The change log is available at https://github.com/Fabricale/Extensions/blob/master/CHANGELOG.md