Jakar.Spans
10.1.0
dotnet add package Jakar.Spans --version 10.1.0
NuGet\Install-Package Jakar.Spans -Version 10.1.0
<PackageReference Include="Jakar.Spans" Version="10.1.0" />
<PackageVersion Include="Jakar.Spans" Version="10.1.0" />
<PackageReference Include="Jakar.Spans" />
paket add Jakar.Spans --version 10.1.0
#r "nuget: Jakar.Spans, 10.1.0"
#:package Jakar.Spans@10.1.0
#addin nuget:?package=Jakar.Spans&version=10.1.0
#tool nuget:?package=Jakar.Spans&version=10.1.0
Jakar.Spans
Allocation-free span primitives. The types live in the Jakar.Extensions namespace. Jakar.Json and Jakar.Extensions both build on this package. Jakar.Extensions type-forwards ValueStringBuilder and Sizes here, so binaries compiled against an older Jakar.Extensions keep working.
The only dependency is JetBrains.Annotations, for its code-analysis attributes.
| Type | Purpose |
|---|---|
ValueStringBuilder |
A stack-only UTF-16 builder: starts from a caller buffer (stackalloc char[256]) or a pooled array, and formats values in place through ISpanFormattable. |
ValueUtf8Builder |
The UTF-8 counterpart: Append("..."u8), UTF-16 text transcoded in place, values formatted through IUtf8SpanFormattable. |
ValueSpanReader<T> |
A forward cursor over a ReadOnlySpan<T> (char, byte, ...): TryPeek, TryRead, TryReadExact, TryReadTo, SkipWhile, and checkpoints with Position / Rewind. Try* members never throw and don't move on failure. |
Sizes |
Maximum formatted lengths per type, used to pre-size buffers. |
using ValueUtf8Builder builder = new(stackalloc byte[256]);
builder.Append("{\"total\" : "u8).AppendUtf8Formattable(12.5m).Append((byte)'}');
ValueSpanReader<char> reader = new("key=value");
reader.TryReadTo('=', out ReadOnlySpan<char> key); // "key"; reader.Remaining is "value"
Versions follow <.NET major>.<library major>.<library minor> (see the repository README).
| 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
- JetBrains.Annotations (>= 2026.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Jakar.Spans:
| Package | Downloads |
|---|---|
|
Jakar.Extensions
Extensions to aid in development. |
|
|
Jakar.Json
A reflection-free, allocation-free JSON serializer: [JsonModel] source-generates idempotent readers and writers (UTF-16 and UTF-8) that implement ISpanFormattable / ISpanParsable, plus a zero-allocation JSON tape and a Newtonsoft-style DOM. Also includes Native AOT friendly System.Text.Json models (IJsonModel<TSelf>, [JsonModel], pooled element-wise JSON arrays), formerly Jakar.SystemTextJson; a type can use both generators side by side. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.1.0 | 239 | 10/16/2026 |
10.1.0: initial release. ValueStringBuilder and Sizes moved out of Jakar.Extensions 10.10 (type-forwarded, so existing binaries keep working); new ValueUtf8Builder and ValueSpanReader<T>.