Soenneker.Extensions.String 4.0.605

Prefix Reserved
dotnet add package Soenneker.Extensions.String --version 4.0.605
                    
NuGet\Install-Package Soenneker.Extensions.String -Version 4.0.605
                    
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="Soenneker.Extensions.String" Version="4.0.605" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.String" Version="4.0.605" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.String" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Extensions.String --version 4.0.605
                    
#r "nuget: Soenneker.Extensions.String, 4.0.605"
                    
#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.
#:package Soenneker.Extensions.String@4.0.605
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Extensions.String&version=4.0.605
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.String&version=4.0.605
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.String

A highly optimized library of string extension methods designed to improve performance, readability, and efficiency in .NET applications. This library is ideal for developers looking to streamline common string operations while adhering to best practices and achieving maximum performance.

Features

  • High Performance: All methods are optimized for speed and low memory usage, ensuring top-notch performance in critical applications.
  • Comprehensive Functionality: Includes a wide range of utility methods for common string operations, such as trimming, splitting, joining, and formatting.
  • Readability-First: Enhances code clarity with intuitive method names and streamlined syntax.
  • Error-Resilient: Methods are built to handle edge cases gracefully, minimizing potential bugs and exceptions.
  • Lightweight: Minimal overhead and dependencies, making it perfect for high-performance applications.

Installation

dotnet add package Soenneker.Extensions.String

Usage

Truncate()

string longString = "This is a long string that needs to be truncated";
string truncatedString = longString.Truncate(10);
// truncatedString = "This is a ..."

IsAlphaNumeric()

string alphanumeric = "abc123";
bool isAlphanumeric = alphanumeric.IsAlphaNumeric();
// isAlphanumeric = true

string nonAlphanumeric = "abc123!";
bool isNonAlphanumeric = nonAlphanumeric.IsAlphaNumeric();
// isNonAlphanumeric = false

Slugify()

string test = "this string&is%bad#for\\urls"

test.Slugify() // "this-string-is-bad-for-urls"

ToDouble()

string numericString = "3.14";
double? doubleValue = numericString.ToDouble();
// doubleValue = 3.14

string nonNumericString = "abc";
double? nonDoubleValue = nonNumericString.ToDouble();
// nonDoubleValue = null

RemoveNonDigits()

string stringWithNonDigits = "abc123xyz456";
string digitsOnly = stringWithNonDigits.RemoveNonDigits();
// digitsOnly = "123456"

Shuffle()

string originalString = "hello";
string shuffledString = originalString.Shuffle();
// shuffledString = "olhel"

... and more

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (57)

Showing the top 5 NuGet packages that depend on Soenneker.Extensions.String:

Package Downloads
Soenneker.Extensions.Configuration

A collection of helpful IConfiguration extension methods

Soenneker.Utils.MemoryStream

An easy modern MemoryStream utility

Soenneker.Utils.Json

A utility library handling (de)serialization and other useful JSON functionalities

Soenneker.Utils.Runtime

A collection of helpful runtime-based operations

Soenneker.Extensions.Enumerable.String

A collection of helpful enumerable string extension methods

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.605 8,295 2/11/2026
4.0.604 18,207 2/10/2026
4.0.603 17,750 2/10/2026
4.0.602 83 2/9/2026
4.0.601 114 2/9/2026
4.0.600 29,446 2/4/2026
4.0.599 19,824 1/28/2026
4.0.598 48,220 1/18/2026
4.0.597 10,882 1/18/2026
4.0.596 27,150 1/13/2026
4.0.595 27,020 1/12/2026
4.0.594 14,283 1/12/2026
4.0.593 3,712 1/12/2026
4.0.592 32,599 1/8/2026
4.0.591 36,575 1/7/2026
4.0.590 56,284 1/3/2026
4.0.589 11,255 1/3/2026
4.0.588 86 1/3/2026
4.0.587 93 1/3/2026
4.0.586 2,628 1/3/2026
Loading failed