Aloe.Utils.Text 1.0.1

dotnet add package Aloe.Utils.Text --version 1.0.1
                    
NuGet\Install-Package Aloe.Utils.Text -Version 1.0.1
                    
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="Aloe.Utils.Text" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aloe.Utils.Text" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Aloe.Utils.Text" />
                    
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 Aloe.Utils.Text --version 1.0.1
                    
#r "nuget: Aloe.Utils.Text, 1.0.1"
                    
#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.
#addin nuget:?package=Aloe.Utils.Text&version=1.0.1
                    
Install Aloe.Utils.Text as a Cake Addin
#tool nuget:?package=Aloe.Utils.Text&version=1.0.1
                    
Install Aloe.Utils.Text as a Cake Tool

Aloe.Utils.Text

Aloe.Utils.Text is a library that provides a high-performance, low-GC StringBuilder struct that combines Stackalloc and ArrayPool.

Key Features

  • Initial buffer allocation using stack allocation
  • Efficient memory management using ArrayPool
  • Low-GC string operations
  • Fast string building

Supported Environments

  • .NET 9 and later

Usage Examples

using Aloe.Utils.Text;

// Basic usage
using (var sb = new ValueStringBuilder(stackalloc char[256]))
{
    sb.Append("Hello");
    sb.Append(" ");
    sb.Append("World");
    var result = sb.ToString(); // Returns "Hello World"
}

// Appending using Span
using (var sb = new ValueStringBuilder(stackalloc char[256]))
{
    ReadOnlySpan<char> span = "Test".AsSpan();
    sb.Append(span);
    var result = sb.ToString(); // Returns "Test"
}

// Appending characters
using (var sb = new ValueStringBuilder(stackalloc char[256]))
{
    sb.Append('a');
    sb.Append('b');
    sb.Append('c');
    var result = sb.ToString(); // Returns "abc"
}

Important Notes

  • Always call Dispose() to return resources (buffers borrowed from ArrayPool)
  • ToString() does not release resources. The builder can be reused until Dispose is called
  • As this is a struct, it's recommended to pass it by reference using the ref keyword

License

MIT License

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Aloe.Utils.Text:

Package Downloads
Aloe.Utils.Wafu.Kansuji

漢数字をアラビア数字に変換するためのユーティリティライブラリ

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 106 6/3/2025
1.0.0 123 6/2/2025