Skip to content

std.text

Accepted

Accepted for V1 namespace ownership and synchronization with string literal byte-sequence semantics. Text APIs are deferred.

std.text owns text-specific values and helpers above the V1 string literal baseline.

Expected Contents

  • owned and growable String
  • text builders
  • Unicode-heavy helpers
  • parsing utilities
  • allocation-backed text APIs
  • future string-view or encoding-specific helpers if they prove necessary

String literals have type []const u8 in V1. Direct source text contributes UTF-8 bytes, while byte escapes can produce arbitrary byte sequences. That keeps literal text usable without importing std and avoids introducing a dedicated string-view type before the text and Unicode design is ready. Owned and growable String, text builders, Unicode-heavy helpers, parsing utilities, and allocation-backed text APIs belong in std.

V1 Boundary

V1 does not accept std.text.String, text builders, UTF-8 validation helpers, parsing utilities, string views, or encoding-specific helper APIs. Full text design is deferred to CEP-0048: Standard Text and Formatting.