Soenneker.Extensions.Spans.Chars 11.0.63

Prefix Reserved
dotnet add package Soenneker.Extensions.Spans.Chars --version 11.0.63
                    
NuGet\Install-Package Soenneker.Extensions.Spans.Chars -Version 11.0.63
                    
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.Spans.Chars" Version="11.0.63" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.Spans.Chars" Version="11.0.63" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.Spans.Chars" />
                    
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.Spans.Chars --version 11.0.63
                    
#r "nuget: Soenneker.Extensions.Spans.Chars, 11.0.63"
                    
#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.Spans.Chars@11.0.63
                    
#: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.Spans.Chars&version=11.0.63
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Spans.Chars&version=11.0.63
                    
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

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

Allocation-free helpers for clearing character buffers and writing pre-sized long values.

Installation

dotnet add package Soenneker.Extensions.Spans.Chars

Clear sensitive characters

using Soenneker.Extensions.Spans.Chars;

Span<char> password = stackalloc char[64];
// Fill and use password...
password.SecureZero();

SecureZero() clears the bytes backing the entire span through CryptographicOperations.ZeroMemory, so the write cannot be optimized away. It mutates only the supplied span; copies of the secret remain the caller's responsibility.

Write an integer into a prepared buffer

using Soenneker.Extensions.Spans.Chars;

const long value = -12345;
Span<char> buffer = stackalloc char[6];

buffer.WriteInt64(value, digits: 6);
string text = new(buffer); // "-12345"

WriteInt64() and WritePositiveInt64() are low-level formatting helpers for code that already knows the exact output length. They avoid allocations, but intentionally do not calculate or validate digits.

  • WriteInt64() accepts the full long range. digits includes the minus sign.
  • WritePositiveInt64() requires a non-negative value. digits is the number of decimal digits.
  • The destination must contain at least digits characters.
  • An incorrect digit count can leave characters unwritten or cause indexing to fail. Use long.TryFormat() when the output length is not already known.
Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Soenneker.Extensions.Spans.Chars:

Package Downloads
Soenneker.Utils.Password

A modern .NET secure password generator

Soenneker.Blazor.Utils.Ids

A lightweight ID generator for consistent identity across the UI for Blazor components.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.63 3,378 11/11/2026
11.0.62 563 11/11/2026
11.0.61 1,663 11/10/2026
11.0.60 67 11/10/2026
11.0.59 100 11/10/2026
4.0.57 25,537 10/15/2026
4.0.56 133 10/14/2026
4.0.55 281 10/14/2026
4.0.54 133 10/14/2026
4.0.48 2,016 10/12/2026
4.0.46 871 10/12/2026
4.0.45 3,033 10/11/2026
4.0.44 126 10/11/2026
4.0.43 19,772 9/24/2026
4.0.42 105 9/24/2026
4.0.41 7,070 9/15/2026
4.0.40 119 9/15/2026
4.0.39 6,857 9/12/2026
4.0.38 139 9/12/2026
4.0.37 21,842 8/30/2026
Loading failed

Updated Multiple NuGet packages