Soenneker.Extensions.Spans.ReadOnly.Strings
11.0.60
Prefix Reserved
dotnet add package Soenneker.Extensions.Spans.ReadOnly.Strings --version 11.0.60
NuGet\Install-Package Soenneker.Extensions.Spans.ReadOnly.Strings -Version 11.0.60
<PackageReference Include="Soenneker.Extensions.Spans.ReadOnly.Strings" Version="11.0.60" />
<PackageVersion Include="Soenneker.Extensions.Spans.ReadOnly.Strings" Version="11.0.60" />
<PackageReference Include="Soenneker.Extensions.Spans.ReadOnly.Strings" />
paket add Soenneker.Extensions.Spans.ReadOnly.Strings --version 11.0.60
#r "nuget: Soenneker.Extensions.Spans.ReadOnly.Strings, 11.0.60"
#:package Soenneker.Extensions.Spans.ReadOnly.Strings@11.0.60
#addin nuget:?package=Soenneker.Extensions.Spans.ReadOnly.Strings&version=11.0.60
#tool nuget:?package=Soenneker.Extensions.Spans.ReadOnly.Strings&version=11.0.60
Soenneker.Extensions.Spans.ReadOnly.Strings
Extension methods for searching, joining, and otherwise processing read-only spans of strings without first materializing another collection.
Installation
dotnet add package Soenneker.Extensions.Spans.ReadOnly.Strings
Usage
using Soenneker.Extensions.Spans.ReadOnly.Strings;
ReadOnlySpan<string> values = ["alpha", "Beta", "gamma"];
bool found = ReadOnlySpanStringExtension.ContainsAPart(values, "bet", StringComparison.OrdinalIgnoreCase); // true
ReadOnlySpan<string?> pieces = ["one", null, "three"];
string joined = ReadOnlySpanStringExtension.JoinStrings(pieces, ',', includeSpace: true);
// "one, , three"
ContainsAPart() skips null elements, stops at the first match, and uses exactly the supplied StringComparison.
JoinStrings() uses a pooled builder. Separators are position-based: a null element contributes no text but still leaves its separator position, as the example shows. An empty span returns ""; includeSpace adds one space after every separator.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Utils.PooledStringBuilders (>= 11.0.46)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Extensions.Spans.ReadOnly.Strings:
| Package | Downloads |
|---|---|
|
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 |
|---|---|---|
| 11.0.60 | 3,707 | 11/11/2026 |
| 11.0.59 | 1,120 | 11/11/2026 |
| 11.0.58 | 3,513 | 11/10/2026 |
| 11.0.57 | 19,771 | 11/3/2026 |
| 11.0.56 | 25,750 | 10/26/2026 |
| 4.0.54 | 24,061 | 10/14/2026 |
| 4.0.53 | 199 | 10/14/2026 |
| 4.0.52 | 330 | 10/14/2026 |
| 4.0.51 | 410 | 10/14/2026 |
| 4.0.45 | 734 | 10/12/2026 |
| 4.0.44 | 4,098 | 10/12/2026 |
| 4.0.43 | 1,785 | 10/11/2026 |
| 4.0.42 | 337 | 10/11/2026 |
| 4.0.41 | 41,960 | 9/29/2026 |
| 4.0.40 | 13,631 | 9/24/2026 |
| 4.0.39 | 106 | 9/24/2026 |
| 4.0.38 | 24,363 | 9/15/2026 |
| 4.0.37 | 112 | 9/15/2026 |
| 4.0.36 | 14,200 | 9/13/2026 |
| 4.0.35 | 4,435 | 9/12/2026 |
Updated Multiple NuGet packages