# Cysharp/ZString

Zero Allocation StringBuilder for .NET and Unity.

Repository: https://github.com/Cysharp/ZString
Canonical: https://ross.abutalabs.com/products/zstring
Language: C#
License: MIT
License Family: permissive
Last push: 2026-08-04T05:45:25+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 96, release rhythm 8, longevity 100
- inputs: {"age_days": 2403, "days_push": 29, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2797, forks 191 (observed 2026-08-28T04:07:22.449137+00:00)

## What it is
ZString is a zero-allocation StringBuilder implementation for .NET Core and Unity that avoids allocations from string concatenation, boxing, and intermediate ToString calls. It supports building Utf16 and Utf8 output directly and integrates with Unity's TextMeshPro for fully allocation-free text updates.

## Use cases
- reduce garbage collection pressure from string concatenation in C#
- format strings without boxing in hot paths
- build UTF-8 strings without intermediate allocations
- update Unity TextMeshPro text without allocating strings
- replace string.Format and string.Concat with allocation-free alternatives

## When to choose
- your .NET or Unity application is GC-bound due to frequent string building
- you need allocation-free text updates in Unity UI
- you want to avoid boxing when formatting struct values

## When to avoid
- string building is not on a performance-critical path
- you need the full System.Text.StringBuilder API surface
- your project does not target .NET or Unity

## Facets
- artifact type: library
- maturity: stable
- function: serialization, developer-tools
- domain: developer-tools, performance
- platform: cross-platform, game-engine, dotnet
- tags: zero-allocation, stringbuilder, string-formatting, utf8, unity, textmeshpro, dotnet, game-development

## Member repositories
- Cysharp/ZString (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:22.449137+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:14:39.200217+00:00, confidence not recorded.
  - readme: https://github.com/Cysharp/ZString (fetched 2026-08-28T04:07:22.449137+00:00, sha 7325b4e66bec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
