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" />
<PackageReference Include="Aloe.Utils.Text" />
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
#tool nuget:?package=Aloe.Utils.Text&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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.