This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 8/19/2026.

String

~import std/string

std/string - String library with view/instance ownership model

string.kz · 17 tors

std/string - String library with view/instance ownership model Ownership states: <view!> - read-only access, can be promoted to instance <instance!> - full control, can read/write/free The String struct carries its allocator, so it can be freed anywhere.

Phantom lifecycles

Derived from the phantom labels in the declarations below — state! issues an obligation the compiler will chase, !state discharges it, a bare state holds it without moving it. Nothing here is hand-drawn.

String 2 states view!instance!

from-page

<view!> koru_std/string.kz:50

take

<!view><instance!> koru_std/string.kz:74

release

<!instance><view!> koru_std/string.kz:78

free

<!view|!instance> koru_std/string.kz:89

read

<view|instance> koru_std/string.kz:100

len

<view|instance> koru_std/string.kz:103

parse-int

<view|instance> koru_std/string.kz:117

from-int

<view!> koru_std/string.kz:130

contains

<view|instance> koru_std/string.kz:148

index-of

<view|instance> koru_std/string.kz:160

substring

<view|instance><view!> koru_std/string.kz:173

append

<instance> koru_std/string.kz:234

append-char

<instance> koru_std/string.kz:251

pop-char

<instance> koru_std/string.kz:281

clear

<instance> koru_std/string.kz:295