# 1.0.0-beta.16 String Scanning And Token Boundary Foundation

Status: combined Slovo/Glagol release scope for `1.0.0-beta.16`.

`1.0.0-beta.16` adds the first explicit string scanning and token-boundary
source facades to `std.string`: byte access, substring extraction, and
prefix/suffix checks over the current runtime string representation. The
release also promotes the matching compiler-known runtime names through the C
runtime, LLVM lowering, source fallback evaluator, diagnostics inventory,
local facade fixtures, and release-gate coverage.

## Scope

- Add `byte_at_result ((value string) (index i32)) -> (result i32 i32)` to
  `lib/std/string.slo`.
- Add `slice_result ((value string) (start i32) (count i32)) -> (result string i32)`
  to `lib/std/string.slo`.
- Add `starts_with ((value string) (prefix string)) -> bool` to
  `lib/std/string.slo`.
- Add `ends_with ((value string) (suffix string)) -> bool` to
  `lib/std/string.slo`.
- Mirror those source facades in
  `examples/projects/std-layout-local-string/src/string.slo`.
- Extend the local and explicit `std.string` examples with success and ordinary
  failure checks for the four helpers.
- Promote matching Glagol runtime entries for `std.string.byte_at_result`,
  `std.string.slice_result`, `std.string.starts_with`, and
  `std.string.ends_with`.
- Add LLVM declarations and lowering for the four promoted runtime names.
- Add C runtime implementations for byte access, byte slicing, prefix checks,
  and suffix checks.
- Extend the source fallback test runner behavior for those names.
- Add focused beta16 compiler coverage for lowering, hosted runtime execution,
  and source fallback execution.
- Extend diagnostics snapshots for arity, type, context, shadowing, and richer
  unsupported string-scanning names.
- Extend standard-library source-search and local-facade fixtures plus
  promotion-gate inventory alignment.
- Update README, `lib/std/README.md`, post-beta roadmap, language roadmap,
  release notes, v1 spec, generated stdlib API, compiler docs, release gate,
  and standard-runtime catalog for beta16.

## Contract

- Helpers are byte-oriented over bytes before the trailing NUL in current
  runtime strings.
- `byte_at_result` returns `ok byte` for a valid zero-based byte index and
  `err 1` for invalid indexes.
- `slice_result` returns `ok text` for a valid byte range and `err 1` for
  invalid ranges.
- `slice_result` allocation failure may follow the existing string allocation
  trap policy.
- `starts_with` and `ends_with` perform byte prefix/suffix checks; empty
  prefix and suffix match.

## Explicit Non-Scope

- no Unicode scalar, grapheme, display-width, locale, normalization, or
  case-folding promise
- no JSON parser
- no object or array parser
- no tokenizer/scanner object API
- no language slice/view syntax or borrowed substring view
- no mutable strings or string containers
- no stable stdlib/API freeze
- no stable ABI/layout or ownership guarantee for returned string allocations
- no performance claim
- no maps, sets, generic collections, or recursive JSON value support
- no worker-owned commit, tag, push, or publication before controller gates

## Expected Verification

- `cargo fmt --check`
- `cargo test --test standard_string_scanning_beta16`
- `cargo test --test diagnostics_contract`
- `cargo test --test standard_string_source_fallback_helpers_alpha`
- `cargo test --test standard_core_facade_source_search_alpha`
- `cargo test --test string_runtime`
- `cargo test --test promotion_gate -- --ignored`
- `cargo test`
- `git diff --check`
- stale current-stage scan for `1.0.0-beta.15`
- public-text scan for local usernames, local filesystem paths, and private host
  publication references
- final `./scripts/release-gate.sh` after commit and generated catalog sync
