Meziantou.Framework.FixedStringBuilder
1.0.1
Prefix Reserved
dotnet add package Meziantou.Framework.FixedStringBuilder --version 1.0.1
NuGet\Install-Package Meziantou.Framework.FixedStringBuilder -Version 1.0.1
<PackageReference Include="Meziantou.Framework.FixedStringBuilder" Version="1.0.1" />
<PackageVersion Include="Meziantou.Framework.FixedStringBuilder" Version="1.0.1" />
<PackageReference Include="Meziantou.Framework.FixedStringBuilder" />
paket add Meziantou.Framework.FixedStringBuilder --version 1.0.1
#r "nuget: Meziantou.Framework.FixedStringBuilder, 1.0.1"
#:package Meziantou.Framework.FixedStringBuilder@1.0.1
#addin nuget:?package=Meziantou.Framework.FixedStringBuilder&version=1.0.1
#tool nuget:?package=Meziantou.Framework.FixedStringBuilder&version=1.0.1
Meziantou.Framework.FixedStringBuilder
Meziantou.Framework.FixedStringBuilder provides fixed-capacity string value types for low-allocation text operations.
Built-in fixed-capacity types
The package includes the following types:
FixedStringBuilder8FixedStringBuilder16FixedStringBuilder32FixedStringBuilder64
using Meziantou.Framework.FixedStringBuilder;
FixedStringBuilder16 sb = $"Hello {"World"}";
sb.AppendLiteral("!");
string str = sb.ToString();
If a value does not fit in the configured capacity, operations throw ArgumentException.
Create a custom fixed-capacity type
The package Meziantou.Framework.FixedStringBuilder.Generator includes a source generator. Declare a partial struct with FixedStringBuilderAttribute:
using Meziantou.Framework.FixedStringBuilder;
[FixedStringBuilderAttribute(128)]
public partial struct FixedStringBuilder128;
The generated struct supports the same APIs as the built-in types (Length, Clear, TryFormat, interpolation, equality, and conversions from string).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. 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 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
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.