Soenneker.Extensions.String
4.0.726
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Extensions.String --version 4.0.726
NuGet\Install-Package Soenneker.Extensions.String -Version 4.0.726
<PackageReference Include="Soenneker.Extensions.String" Version="4.0.726" />
<PackageVersion Include="Soenneker.Extensions.String" Version="4.0.726" />
<PackageReference Include="Soenneker.Extensions.String" />
paket add Soenneker.Extensions.String --version 4.0.726
#r "nuget: Soenneker.Extensions.String, 4.0.726"
#:package Soenneker.Extensions.String@4.0.726
#addin nuget:?package=Soenneker.Extensions.String&version=4.0.726
#tool nuget:?package=Soenneker.Extensions.String&version=4.0.726
Soenneker.Extensions.String
Practical string extensions for validation, conversion, cleanup, formatting, URL slugs, and other common application code.
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"
These are only a few of the available operations; importing Soenneker.Extensions.String makes the full set available on string values.
| Product | Versions 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. |
-
net10.0
- Soenneker.Culture.English.US (>= 4.0.48)
- Soenneker.Extensions.Spans.Readonly.Chars (>= 4.0.101)
- Soenneker.Utils.Random (>= 4.0.128)
NuGet packages (58)
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.Runtime
A collection of helpful runtime-based operations |
|
|
Soenneker.Extensions.Enumerable.String
A collection of helpful enumerable string extension methods |
|
|
Soenneker.Documents.Document
The base document type providing a building block for storage objects |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.732 | 0 | 8/30/2026 |
| 4.0.731 | 0 | 8/30/2026 |
| 4.0.729 | 0 | 8/30/2026 |
| 4.0.728 | 0 | 8/29/2026 |
| 4.0.727 | 3 | 8/29/2026 |
| 4.0.726 | 236 | 8/29/2026 |
| 4.0.725 | 92 | 8/29/2026 |
| 4.0.724 | 184 | 8/29/2026 |
| 4.0.723 | 27,210 | 8/26/2026 |
| 4.0.722 | 11,937 | 8/25/2026 |
| 4.0.721 | 241 | 8/25/2026 |
| 4.0.720 | 6,025 | 8/25/2026 |
| 4.0.719 | 40,003 | 8/21/2026 |
| 4.0.718 | 51,900 | 8/18/2026 |
| 4.0.717 | 12,478 | 8/18/2026 |
| 4.0.716 | 54,498 | 8/11/2026 |
| 4.0.715 | 81,983 | 8/8/2026 |
| 4.0.714 | 44,591 | 8/7/2026 |
| 4.0.713 | 52,318 | 7/29/2026 |
| 4.0.712 | 38,146 | 7/28/2026 |
Improve XML documentation