Beskid

Jump to a Beskid service

Platform specification
featureStandard

Core String

Canonical OpenSpec capability for Core String.

Document layout: Feature capability layoutConforming
  • ## Purpose
  • ## Requirements

Core.String Specification

Purpose

Core.String is the standard prelude-bound hub for string manipulation, character classification, and UTF-8 encoding primitives.

Requirements

Requirement: Core string operations: Decision [D-CORE-PRIM-0130]

The Beskid standard SHALL enforce the following migrated contract section. Accepted ADR decisions are binding; uppercase requirement keywords retain their BCP-14 meaning.

The @tier(standard) Core.String hub SHALL provide Len, IsEmpty, Concat, Contains, StartsWith, EndsWith, IndexOf, LastIndexOf, Substring, Replace, Split, Trim, TrimStart, TrimEnd, ToLower, and ToUpper; case conversion MUST be ASCII-only.

Stable ID: BSP-REQ-0000000000000130

Scenario: Conformance exercises Decision

  • GIVEN an implementation claims conformance with this capability
  • WHEN behavior governed by this contract section is exercised
  • THEN every MUST, SHALL, REQUIRED, prohibition, and accepted decision in the section is satisfied

Requirement: Character classification: Decision [D-CORE-PRIM-0131]

The Beskid standard SHALL enforce the following migrated contract section. Accepted ADR decisions are binding; uppercase requirement keywords retain their BCP-14 meaning.

Core.String.Chars SHALL expose IsDigit, IsLetter, IsWhitespace, IsUpper, IsLower, and IsAlphaNumeric predicates with boolean results for individual characters.

Stable ID: BSP-REQ-0000000000000131

Scenario: Conformance exercises Decision

  • GIVEN an implementation claims conformance with this capability
  • WHEN behavior governed by this contract section is exercised
  • THEN every MUST, SHALL, REQUIRED, prohibition, and accepted decision in the section is satisfied

Requirement: UTF-8 encoding primitives: Decision [D-CORE-PRIM-0132]

The Beskid standard SHALL enforce the following migrated contract section. Accepted ADR decisions are binding; uppercase requirement keywords retain their BCP-14 meaning.

Core.String.Utf8 SHALL provide DecodeRune returning {rune:i64, width:i64}, EncodeRune(i64) -> string, and IsValid(string) -> bool; malformed UTF-8 MUST be reported by the validity contract rather than silently accepted.

Stable ID: BSP-REQ-0000000000000132

Scenario: Conformance exercises Decision

  • GIVEN an implementation claims conformance with this capability
  • WHEN behavior governed by this contract section is exercised
  • THEN every MUST, SHALL, REQUIRED, prohibition, and accepted decision in the section is satisfied