Kuchulem.DotNet.Extensions
2.0.0
dotnet add package Kuchulem.DotNet.Extensions --version 2.0.0
NuGet\Install-Package Kuchulem.DotNet.Extensions -Version 2.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="2.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 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Kuchulem.DotNet.Extensions, 2.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=2.0.0 // Install Kuchulem.DotNet.Extensions as a Cake Tool #tool nuget:?package=Kuchulem.DotNet.Extensions&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Kuchulem.DotNet.Extensions
Various extension methods for .net8
How to install
Choose the method you prefere.
Package Manager
Install-Package Kuschulem.DotNet.Extensions -Version 2.0.0
.Net CLI
dotnet add package Kuschulem.DotNet.Extensions --version 2.0.0
Package reference
<PackageReference Include="Kuschulem.DotNet.Extensions" Version="2.0.0" />
Paket CLI
paket add Kuschulem.DotNet.Extensions --version 2.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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- 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 |