Kuchulem.DotNet.Extensions 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Kuchulem.DotNet.Extensions --version 1.0.0                
NuGet\Install-Package Kuchulem.DotNet.Extensions -Version 1.0.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="Kuchulem.DotNet.Extensions" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Kuchulem.DotNet.Extensions --version 1.0.0                
#r "nuget: Kuchulem.DotNet.Extensions, 1.0.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 Kuchulem.DotNet.Extensions as a Cake Addin
#addin nuget:?package=Kuchulem.DotNet.Extensions&version=1.0.0

// Install Kuchulem.DotNet.Extensions as a Cake Tool
#tool nuget:?package=Kuchulem.DotNet.Extensions&version=1.0.0                

Kuchulem.DotNet.Extensions

NuGet Version NuGet Preversion

Unit tests CodeQL

Various extension methods for DotNet standard

How to install

Choose the method you prefere.

Package Manager

Install-Package Kuschulem.DotNet.Extensions -Version 1.0.0

.Net CLI

dotnet add package Kuschulem.DotNet.Extensions --version 1.0.0

Package reference

<PackageReference Include="Kuschulem.DotNet.Extensions" Version="1.0.0" />

Paket CLI

paket add Kuschulem.DotNet.Extensions --version 1.0.0

Usage

IEnumerable.ForEach

Applies an action to all element of the enumerable.

// Lets initialize a random byte array
var input = new byte[100];
var randomizer = new Random();
randomizer.NextBytes(input);
// Use the .ForEach extension method to apply an action to all elements
input.ForEach(b => Console.WriteLine($"Got value {b}"));

String.ToChunks

Splits a string in chunks of the same size. Can preserve words.

var input = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce dictum dictum orci, et placerat quam egestas vitae. Duis sed nisi.";

// split in chunks of 20 characters
var chunks = input.ToChunks(20);
// Split in chunks of 20 characters, preserve words
var chunksWholeWords = input.ToChunks(20, true);

String.RemoveDiacritics

Removes diacritics (accents) from characters

var input = "Rédaction d'une chaîne de charactères accentuée";
var result = input.RemoveDiacritics();
// result = "Redaction d'une chaine de characteres accentuee";

String.ToSlug

Converts a string to a slug (a string that can be used as-is in urls, without url encoding)

var input = "Rédaction d'une chaîne de charactères accentuée !";
var result = input.ToSlug();
// result = "redaction-d-une-chaine-de-characteres-accentuee--";
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.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Kuchulem.DotNet.Extensions:

Package Downloads
Kuchulem.DotNet.ConsoleHelpers

A ConsoleExtended static class to write in console and extension methods for objects to write clean debug lines

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0 161 1/20/2024
1.0.0 749 11/22/2022
1.0.0-beta.2 112 11/22/2022
1.0.0-beta.1 110 11/22/2022