ahbsd.lib 1.6.0

dotnet add package ahbsd.lib --version 1.6.0                
NuGet\Install-Package ahbsd.lib -Version 1.6.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ahbsd.lib" Version="1.6.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ahbsd.lib --version 1.6.0                
#r "nuget: ahbsd.lib, 1.6.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ahbsd.lib as a Cake Addin
#addin nuget:?package=ahbsd.lib&version=1.6.0

// Install ahbsd.lib as a Cake Tool
#tool nuget:?package=ahbsd.lib&version=1.6.0                

Version 1.6

Simplifing string.IsNullOrEmpty() and string.IsNullOrWhiteSpace() and the extraction of numbered lists in a string.

Example for the extraction

If you have a numbered list, e.g.: "1,2, 5, 99 ,8" and want to get an array or List with the numbers, you can solve it e.g. like this:

string numberedList = "1,2, 5, 99 ,8";

// for a result array:
string[] numbers = numberedList.Split(',');
int[] intNumbers = new int[numbers.Count];

for (int i = 0; i < numbers.Count; i++)
{
    if (int.TryParse(numbers[i].Trim(), out int number)
    {
        intNumbers[i] = number;
    }
}

// for a result list:
IList<int> numberList = new List<int>();

foreach (string sNumber in numberedList.Split(','))
{
    if (int.TryParse(sNumber.Trim(), out int number)
    {
        numberList.Add(number);
    }
}

much shorter (because the last part is more ore less included) is the following:

string numberedList = "1,2, 5, 99 ,8";
IList<int> numberList = numberedList.GetIntList();

additionally the Extension also allows to set the splitter:

string numberedList = "1;2; 5; 99 ;8";
IList<int> numberList = numberedList.GetIntList(';');
Product 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.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on ahbsd.lib:

Package Downloads
ahbsd.lib.numbersystems

A library for changing number bases UINT only. I first had the idea of making a library like this, when I helped a person of business school to understand number systems. In my eyes the best way to describe how binary and hexadecimal work, is to help understand the basics on numeric bases. So after this person was able to describe the transformation in general, I started documentation and coding it. See on GitHub (most in german).

ahbsd.lib.macadress.api_core3.1

Simple static class to get the vndor of a MAC adress. See https://macvendors.com/api

ahbsd.lib.Exceptions_Core-5.0

The newer version for .NET CORE 5.0

ahbsd.network.check_core3.1

A Simple check, if a network address is reachable

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.6.0 211 5/7/2023
1.5.0 484 9/25/2022
1.4.0 570 4/3/2021
1.3.0 375 3/23/2021
1.2.3 394 2/24/2021
1.2.1 348 2/11/2021
1.2.0 352 2/7/2021
1.0.1 402 12/16/2020
1.0.0 591 12/16/2020

Version 1.5 has added some functionallity and removed a lot of SonarLint issues