Soenneker.Extensions.Spans.ReadOnly.Strings
4.0.37
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Extensions.Spans.ReadOnly.Strings --version 4.0.37
NuGet\Install-Package Soenneker.Extensions.Spans.ReadOnly.Strings -Version 4.0.37
<PackageReference Include="Soenneker.Extensions.Spans.ReadOnly.Strings" Version="4.0.37" />
<PackageVersion Include="Soenneker.Extensions.Spans.ReadOnly.Strings" Version="4.0.37" />
<PackageReference Include="Soenneker.Extensions.Spans.ReadOnly.Strings" />
paket add Soenneker.Extensions.Spans.ReadOnly.Strings --version 4.0.37
#r "nuget: Soenneker.Extensions.Spans.ReadOnly.Strings, 4.0.37"
#:package Soenneker.Extensions.Spans.ReadOnly.Strings@4.0.37
#addin nuget:?package=Soenneker.Extensions.Spans.ReadOnly.Strings&version=4.0.37
#tool nuget:?package=Soenneker.Extensions.Spans.ReadOnly.Strings&version=4.0.37
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 | 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.Utils.PooledStringBuilders (>= 4.0.31)
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 |
|---|---|---|
| 4.0.40 | 0 | 9/24/2026 |
| 4.0.39 | 0 | 9/24/2026 |
| 4.0.38 | 15,588 | 9/15/2026 |
| 4.0.37 | 83 | 9/15/2026 |
| 4.0.36 | 14,155 | 9/13/2026 |
| 4.0.35 | 4,410 | 9/12/2026 |
| 4.0.34 | 33,562 | 9/7/2026 |
| 4.0.33 | 48,713 | 8/31/2026 |
| 4.0.32 | 3,562 | 8/30/2026 |
| 4.0.31 | 4,730 | 8/30/2026 |
| 4.0.30 | 101 | 8/29/2026 |
| 4.0.28 | 106 | 8/29/2026 |
| 4.0.27 | 83,416 | 7/28/2026 |
| 4.0.26 | 1,317 | 7/28/2026 |
| 4.0.25 | 21,666 | 7/16/2026 |
| 4.0.24 | 124 | 7/16/2026 |
| 4.0.23 | 30,180 | 6/19/2026 |
| 4.0.22 | 138 | 6/19/2026 |
| 4.0.21 | 29,671 | 6/5/2026 |
| 4.0.20 | 39,684 | 4/23/2026 |
Update dependency dotnet-sdk to v10.0.401 (#202)
Automatically merged