std/core
Auto-imported in every Vader program.
Layout :
- Trait declarations (Display, Equals, Comparable, Hash, Clone, arithmetic, indexing, containment, iteration, error)
- Core type definitions and their impls (Continuation, Range) + the blanket array / Display→string impls
The primitive-type impls (Display, Equals, Hash, Comparable, Step,
arithmetic, string) live in the sibling primitives.vader: same
module "std/core", split out so neither file outgrows ~500 LoC.
The base Error trait marking the error side of a union lives in §1 ; the
concrete error structs are user-defined.
Types
ArrayOps :: trait<T> The built-in methods of T[]. Bodyless: provided by the compiler's array
ops, not a Vader body. T is the element type.
Methods
len :: fn(self) -> i64 Number of live elements.
push :: fn(self, value: T) -> void Append value to the end, growing the backing storage as needed.
push_all :: fn(self, other: T[]) -> void Append every element of other (a borrowed, immutable view).
copy_to :: fn(self, src_off: i64, dst: T[], dst_off: i64, count: i64) -> void Copy count elements from self[src_off..] into dst[dst_off..].
Reads self ; it is dst that is written.
remove_last :: fn(self) -> T | null Remove and return the last element, or null when empty.
clear :: fn(self) -> void Drop every element (length → 0), keeping the reserved capacity.
BigInt :: u32[] A fixed-width natural (unsigned) big integer : little-endian base-2^32
limbs. Zero is any run of zero limbs: [] usually, [0] after a / that
leaves nothing in the top limb.
BigInt :: u32[] is a distinct newtype (array-backed) : the structural array
ops (index, len/push, for-in, [...] literals) forward to the backing
array, while the scalar arithmetic is overloaded on the nominal type:
bigint * u32 (Mul<u32>) and bigint / u32 → [quotient, remainder]
(Div<u32, [BigInt, u32]>). mul_add_small (×+add) has no operator form and
stays a method.
Buffer :: struct Opaque handle to a GC-managed contiguous byte region. Carries no fields : the
backing bytes live in a dedicated runtime object (the BUFFER sentinel
type), addressed only through the @intrinsic methods below. Never built via
a struct literal: allocate with new_byte_buffer(n).
ByteAccess Display :: trait Convert a value to its canonical string form. Drives compile-time
string interpolation ("${value}") and the print / println family
in std/io. Every primitive type ships an @intrinsic impl ; user
types opt in by declaring their own to_string.
Methods
to_string :: fn(self) -> string Equals :: trait Structural equality. Powers the == and != operators : a != b is
!a.equals(b), so the two cannot disagree.
Methods
equals :: fn(self, other: Self) -> bool Comparable :: trait Total ordering. Powers < / <= / > / >= : a < b is
a.compare(b) < 0, so an impl provides compare alone and the four operators
cannot disagree with it.
compare(a, b) must return:
< 0whenais strictly less thanb,= 0when they're equal,> 0whenais strictly greater thanb.
Methods
compare :: fn(self, other: Self) -> i32 Hash :: trait Hash codes for MutableMap / MutableSet keys: equal values (Equals), equal hashes.
A map's first probe reads the LOW bits; a key varying only in high ones should mix them down.
Methods
hash :: fn(self) -> u64 Step :: trait Advance one position along a discrete sequence. Sole obligation : step()
returns the next value after self. Used by Range[T : Step & Comparable] implements Iterator<T> so a single generic impl covers every integer
width plus char: concrete + 1 / codepoint-bump logic lives in each
primitive's Step impl instead of being repeated per Range<T> impl.
Methods
step :: fn(self) -> Self Clone :: trait Explicit deep copy. clone(x) (free function) dispatches into this
when T: Clone ; primitive types don't need it (value-typed by
default).
Methods
clone :: fn(self) -> Self Into :: trait<Target> Type-to-type conversion. Two surfaces :
- Implicit : when a value of type
Sflows into a slot expectingTargetandS implements Into<Target>, the compiler insertsvalue.into()at the boundary. Sites : call args with a typed parameter,returnvalues,x: T = v, struct-literal fields, and the receiver of a method call no function takes as is. - Explicit :
Target(value), the sameType(value)syntax that performs primitive numeric casts (u32(x),i64(x)). WhenTargetis a user type, the compiler routes the call through the matchingIntoimpl instead of emitting a primitive cast.
Coercion is not transitive (A → B → C never auto-chains), and
T implements Into<T> is forbidden. SPEC §4 Type coercion via Into
gives the full rules, among them which targets convert.
Methods
into :: fn(self) -> Target Add :: trait<Rhs = Self, Out = Self> + dispatch. Numeric primitives use the built-in bytecode op directly ;
user types implement Add to opt into the operator form. Rhs is the
right-operand type and Out the result: both default to Self, so the
common homogeneous case is just implements Add; heterogeneous operators
(e.g. Instant implements Add<Duration, Instant>) spell the params.
Methods
add :: fn(self, other: Rhs) -> Out Sub :: trait<Rhs = Self, Out = Self> - dispatch. See Add.
Methods
sub :: fn(self, other: Rhs) -> Out Mul :: trait<Rhs = Self, Out = Self> * dispatch. See Add.
Methods
mul :: fn(self, other: Rhs) -> Out Div :: trait<Rhs = Self, Out = Self> / dispatch. See Add.
Methods
div :: fn(self, other: Rhs) -> Out Rem :: trait<Rhs = Self, Out = Self> % dispatch. See Add.
Methods
rem :: fn(self, other: Rhs) -> Out Zero :: trait The additive identity of a type: what a sum of no elements is. A static
member : called on the type, T.zero() in a body bounded by T: Zero.
Methods
zero :: fn() -> Self The value z for which z + x == x.
One :: trait The multiplicative identity of a type: what a product of no elements is. A
static member, like Zero.zero.
Methods
one :: fn() -> Self The value u for which u * x == x.
FloatBits :: trait Bit-level view of a float as its raw IEEE 754 integer pattern. This is NOT a
numeric conversion : u64(x) truncates the VALUE (3.7 → 3), whereas
x.to_bits() returns the exact bits (3.0 → 0x4008000000000000). The
inverse is BitsFloat::from_bits. Powers shortest-double formatting and any
float bit-fiddling, with no per-target runtime symbol (lowers to a union
cast). Mirrors Rust's f64::to_bits / f64::from_bits (deliberately
distinct from the as/cast conversion).
Methods
to_bits :: fn(self) -> u64 The raw IEEE 754 bit pattern of self.
BitsFloat :: trait Inverse of FloatBits: reconstruct an f64 from a raw IEEE 754 bit pattern.
Methods
from_bits :: fn(self) -> f64 Reinterpret self's bits as an f64 (NOT f64(self), which widens the
integer value).
Float32Bits :: trait 32-bit analogue of FloatBits : the raw IEEE 754 u32 bit pattern of an
f32 (NOT u32(self), which truncates the value). Powers the pure-Vader
shortest-f32 formatter (Ryu f2s). Inverse is Bits32Float::from_bits.
Methods
to_bits :: fn(self) -> u32 The raw IEEE 754 bit pattern of self.
Bits32Float :: trait Inverse of Float32Bits: reconstruct an f32 from a raw IEEE 754 u32
bit pattern (NOT f32(self), which widens the integer value).
Methods
from_bits :: fn(self) -> f32 Reinterpret self's bits as an f32.
Index :: trait<I, T> Indexed read: a[i] dispatches through this when a isn't a built-in
array. I is the index type, T the element type.
Methods
at :: fn(self, i: I) -> T IndexSet :: trait<I, T> Indexed write: a[i] = v. Symmetric with Index.
Methods
set_at :: fn(self, i: I, v: T) Contains :: trait<T> Membership test. x in coll desugars to coll.contains(x) ;
x !in coll desugars to !coll.contains(x). Implemented by Range
(for the integer / char ranges), MutableMap, MutableSet, and any
user type that wants infix in support.
Methods
contains :: fn(self, value: T) -> bool Continuation :: enum(u8) How one iterator step ended, see Iterator.next.
Variants
Continue The step produced a value.
Stop The iteration is over; the value beside this one means nothing.
Iterator :: trait<T> Pull-based iterator. The lowerer dispatches for x in iter through
the impl table: users never call next directly. What consumes one
(count, last, collect, find...) is a free function over
Iterator<T> in std/iter, a for over its argument.
next() hands back the element and whether the iteration goes on. A PAIR
rather than a wrapper around a nullable: the pair crosses the call in
registers instead of through the heap, and it makes T = U | null
unremarkable: Continuation says whether there is an element, so a null
ELEMENT is just an element.
The element beside Continuation.Stop is INDETERMINATE. An implementation
hands over whatever T it has rather than manufacturing one, and no consumer
may read it before testing the Continuation.
Methods
next :: fn(self) -> [T, Continuation] Error :: trait Base trait for every error type usable in T | Error returns. Any struct
implementing Error participates in such error unions ; a caller narrows
on it (if r is Error) and returns it to propagate.
Methods
message :: fn(self) -> string Suspended :: struct Sentinel returned by Async.resume when the coroutine suspended (it awaited
something not yet ready) rather than completing. T | Suspended stays
unambiguous because Suspended is a distinct nominal type, where
Iterator.next carries the same information BESIDE the element instead, in
its Continuation.
Fields
wake_at: i64 = 0 The scheduler time (sched_now, in ms) before which resuming again cannot
make progress: a driver holding several awaitables re-drives this one only
once the clock reaches it. 0, the default, means unknown: re-drive it on
every wake. A coroutine reports the value of the child it is parked on.
Async :: trait<T> The awaitable produced by calling an async fn: await e unwraps
Async<T> to T. Each async fn's synthesised state struct implements
it (wired in lowering). Carries no error semantics of its own ; a fallible
async fn returns Async<T | SomeError>.
Methods
resume :: fn(self) -> T | Suspended Drive the coroutine one step : returns the final value T on
completion, or the Suspended sentinel when it awaited something not
yet ready. Synthesised per async fn by lowering. The resumed value
is delivered out-of-band (a synthesised erased frame slot the scheduler
sets before each call), so this signature stays source-clean.
cancel :: fn(self) -> void Tear the awaitable down without completing it : run any pending defers
(LIFO), recursively cancel the child it is parked on, and retire it.
Called only on a not-yet-completed awaitable (a loser of race / join_any /
timeout, or a subtree whose parent was cancelled): internal to the
runtime, never invoked by user code in v1.
The default is a no-op : a hand-written awaitable holding no resources
needs no teardown. The compiler synthesises an override per async fn
(drain its defers + recurse into its current child) ; the concurrency
combinators override it to cancel every child they own.
Field :: struct One field of a struct type as exposed by the @fields(T) reflection
intrinsic. name is the source-level identifier ; type carries the
field's declared type as a runtime type value.
Fields
name: string type: type Range :: struct<T> Range produced by 0..<n / 0..=n and 'a'..='z'. Generic over the
bound type so integer ranges (every signed / unsigned width plus
i64 / i64) and char ranges share a single struct. The cursor
field is advanced by each next call via implicit struct-ref mutation.
Fields
start: T end: T inclusive: bool done: bool = false Set once an inclusive range has handed out end. Its cursor stays there:
a step past end may leave T (past 255 in a u8).
cursor: T i8 :: Int in -0x80..=0x7F A signed 8-bit integer.
i16 :: Int in -0x8000..=0x7FFF A signed 16-bit integer.
i32 :: Int in -0x8000_0000..=0x7FFF_FFFF A signed 32-bit integer, the type of an integer literal nothing else types.
i64 :: Int in -0x8000_0000_0000_0000..=0x7FFF_FFFF_FFFF_FFFF A signed 64-bit integer, the type of a length, an index and a size.
u8 :: Int in 0..=0xFF An unsigned 8-bit integer.
u16 :: Int in 0..=0xFFFF An unsigned 16-bit integer.
u32 :: Int in 0..=0xFFFF_FFFF An unsigned 32-bit integer.
u64 :: Int in 0..=0xFFFF_FFFF_FFFF_FFFF An unsigned 64-bit integer.
DecimalParts :: struct The scanned parts of a decimal float : significand w (first <= 19
significant digits), power-of-ten exponent q, sign, and whether more than
19 significant digits were seen (needs the slow path, not yet built).
Fields
w: u64 q: i32 negative: bool too_many_digits: bool Functions
filled :: fn<T>(n: i64, make: fn() -> T) -> T[] Build an array of n elements, calling make once per slot.
The complement of [v] * n, which repeats ONE reference into every slot and
so cannot build n distinct objects (see W0013).
Parameters
| n | i64 | number of elements to build. |
| make | fn() -> T | called once per slot, in order ; its result fills that slot. |
Returns
T[] a fresh array of length n, its capacity reserved up front.Example
rows: BlockId[][] = filled(block_count, () -> []) // n DISTINCT arrays
seen :: filled(n, new_visited_set) // or a named factoryfilled_indexed :: fn<T>(n: i64, make: fn(i64) -> T) -> T[] Build an array of n elements, calling make(i) for slot i.
The positional twin of filled : reach for it when an element depends on
where it sits, and for filled when it doesn't.
Parameters
| n | i64 | number of elements to build. |
| make | fn(i64) -> T | called once per slot, in order, with that slot's index. |
Returns
T[] a fresh array of length n, its capacity reserved up front.Example
squares :: filled_indexed(n, (i) -> i32(i * i))
rows :: filled_indexed(n, (i) -> Row { .id = i })content_equals :: fn<T: Equals>(self: T[], other: T[]) -> bool Whether self and other hold equal elements in the same order : the same
length, and self[i] == other[i] at every index.
Parameters
| self | T[] | No description. |
| other | T[] | the array compared with. |
Returns
bool Example
assert([1, 2].content_equals([1, 2]), "same contents")is_permutation_of :: fn<T: Equals>(self: T[], other: T[]) -> bool Whether other holds the elements of self in some order, each as many times.
Quadratic : each element of self is looked for among the elements of other
not yet matched.
Parameters
| self | T[] | No description. |
| other | T[] | the array compared with. |
Returns
bool Example
assert([1, 2, 2].is_permutation_of([2, 1, 2]), "same elements")contains_all :: fn<T: Equals>(self: T[], other: T[]) -> bool Whether every element of other is in self. Each counts once :
[1].contains_all([1, 1]) holds.
Parameters
| self | T[] | No description. |
| other | T[] | the elements looked for. |
Returns
bool is_disjoint :: fn<T: Equals>(self: T[], other: T[]) -> bool Whether self and other share no element.
Parameters
| self | T[] | No description. |
| other | T[] | the array compared with. |
Returns
bool mul_add_small :: fn(self: BigInt, mul: u32, add: u32) -> BigInt Multiply by a small scalar and add a small scalar : self * mul + add.
One limb pass, O(n). The single primitive behind the ×5 power-of-five step and the ×10 + digit decimal accumulation.
Parameters
| self | BigInt | the operand. |
| mul | u32 | the u32 multiplier. |
| add | u32 | a u32 addend folded into the low limb (carrying up). |
Returns
BigInt self * mul + add, one limb wider when it overflows.is_zero :: fn(self: BigInt) -> bool True when every limb is zero. The generic is_zero does not apply : BigInt
has no Equals, and its zero has several forms.
Parameters
| self | BigInt | No description. |
Returns
bool shl128 :: fn(hi: u64, lo: u64, s: i32) -> [u64, u64] Left-shift a raw 128-bit value (hi:lo) by s in [0, 127].
Operates on a two-word value rather than a BigInt: a shared helper for
top128 and the dtoa split rows.
Parameters
| hi | u64 | No description. |
| lo | u64 | No description. |
| s | i32 | No description. |
Returns
[u64, u64] the shifted [hi, lo] ; bits above 128 are dropped.array_iter :: fn<T>(arr: T[]) -> Iterator<T> Iterate a T[]. for x in arr has its own fast path and never comes here;
this is what an array COERCED to Iterator<T> becomes.
A generator rather than a hand-written impl, and that is forced rather than
chosen: next must pair its element with a Continuation, and on Stop
there is no T to pair: an empty array holds none, and T promises nothing
that would build one. A generator's next is synthesised by the lowerer,
which pairs the type's zero; a ref slot takes NULL whatever T says, and
that is expressible there and not here.
Parameters
| arr | T[] | No description. |
Returns
Iterator<T> scan_decimal :: fn(s: string) -> DecimalParts | null Scan a decimal float string into DecimalParts, or null on malformed
input (empty, no digits, a bare exponent, trailing junk). w holds the
first 19 significant digits ; leading zeros are skipped and q tracks the
decimal point + exponent.
Parameters
| s | string | the decimal float text. |
Returns
eisel_lemire :: fn(w0: u64, q: i32) -> u64 Eisel-Lemire : the packed IEEE-754 MAGNITUDE bits of w * 10^q (sign not
applied), correctly rounded for w with <= 19 significant digits. w == 0
yields +0 ; q below -342 yields 0, above 308 yields inf.
Parameters
| w0 | u64 | the significand (<= 19 significant digits). |
| q | i32 | the power-of-ten exponent. |
Returns
u64 (power2 << 52) | mantissa, OR the caller's sign bit onto it.parse_f64 :: fn(s: string) -> f64 | null Parse a decimal float string to f64, or null on malformed input.
Correctly rounded : the Eisel-Lemire fast path for <= 19 significant digits,
an exact big-int slow path for more.
Parameters
| s | string | the decimal float text. |
Returns
f64 | null the parsed f64, or null when s is not a decimal float.byte_len :: fn(s: string) -> i64 Byte length of s (its UTF-8 byte count), an @intrinsic read straight off
the interned atom. String-only: a u8[] uses .len() directly.
Parameters
| s | string | No description. |
Returns
i64 byte_at :: fn(s: string, i: i64) -> u8 The byte at index i of s: an @intrinsic header-free read straight off
the interned atom, no read-only u8[] view materialised: how code reads a
string's bytes, the peer of byte_len for the [i] case.
Parameters
| s | string | No description. |
| i | i64 | No description. |
Returns
u8 Errors
- traps when
i >= byte_len(s), matchings.bytes()[i].
byte_slice :: fn(s: string, start: i64, end: i64) -> string The bytes of s from offset start up to end, excluded, as a string: an
@intrinsic slice of the interned atom, nothing copied. Offsets count bytes,
where s[i] counts codepoints. Like any slice, offsets past the end clamp to
it, and an end before start gives the empty string.
Parameters
| s | string | source string. |
| start | i64 | first byte offset, included. |
| end | i64 | byte offset where the slice stops, excluded. |
Returns
string is_ascii :: fn(s: string) -> bool Whether every byte of s is ASCII (below 0x80): each byte is then one codepoint,
and a byte offset is a codepoint index. The runtime records it when the string is
made, so the answer reads no byte.
Parameters
| s | string | the string to test. |
Returns
bool bytes_to_string :: fn(bs: u8[]) -> string Materialise a string from verbatim UTF-8 bytes: the canonical bytes→string
primitive (inverse of bytes). Host intrinsic backed by vader_string_as_string
(the runtime symbol kept its name) ; O(1) on a borrowed bytes() slice, O(n) on
a packed array, no UTF-8 validation.
Parameters
| bs | u8[] | the UTF-8 bytes to materialise (typically a bytes() slice). |
Returns
string the string those bytes encode.bytes :: fn(s: string) -> u8[] Borrow the UTF-8 bytes of a string as a read-only u8[] view: the canonical
string→bytes primitive, inverse of bytes_to_string. Host intrinsic backed
by vader_string_bytes_view (no new runtime symbol) ; a zero-copy borrowed
view of the interned bytes on native, read in place on the VM until a write
copies it. To read a string's bytes, byte_len, byte_at and byte_slice take
the string itself.
Parameters
| s | string | source string. |
Returns
u8[] a read-only u8[] over the UTF-8 bytes of s.is_utf8_continuation :: fn(b: u8) -> bool True when b is a UTF-8 continuation byte (0x80..0xBF): the trailing bytes
of a multi-byte sequence, never a leading byte.
Parameters
| b | u8 | No description. |
Returns
bool utf8_encode :: fn(c: char) -> u8[] Encode a Unicode codepoint to its UTF-8 bytes (pure arithmetic), for
interning via bytes_to_string or appending into a byte buffer.
codepoint_at_byte reads back what this writes.
Parameters
| c | char | the codepoint to encode. |
Returns
u8[] the 1–4 UTF-8 bytes encoding c.codepoint_at_byte :: fn(s: string, i: i64) -> [char, i64] Decode the UTF-8 codepoint at byte offset i of a string, read in place: the
codepoint and the bytes it spans. Advance a byte cursor by that width to land
on the next codepoint. Malformed bytes decode as U+FFFD, spanning the longest
prefix of a well-formed sequence and at least one byte: the substitution
Unicode recommends and WHATWG decoders apply. Every codepoint walk in the
standard library steps this way, so len, s[i] and for c in s agree on any
bytes.
Parameters
| s | string | the source string. |
| i | i64 | byte offset. Traps if i >= s.byte_len(). |
Returns
[char, i64] [codepoint, byte_width], the width 1 to 4.Example
[c, width] :: "é!".codepoint_at_byte(0) // ['é', 2]decode_tail :: fn(s: string, b: u8, i: i64) -> [u32, i64] Decode the non-ASCII codepoint that b, the byte at offset i of s, leads:
codepoint_at_byte past its ASCII test, for a walk that has read the byte.
Parameters
| s | string | the source string. |
| b | u8 | s.byte_at(i), at least 0x80. |
| i | i64 | the byte offset of b. |
Returns
[u32, i64] [codepoint, byte_width], malformed bytes decoded as codepoint_at_byte does. The codepoint is a u32, a Unicode scalar value by the bytes it was read from: a caller wanting the char converts it.len :: fn(s: string) -> i64 Codepoint length of s: the number of Unicode codepoints, not bytes. In the
prelude, so s.len() works without importing std/string. Counts the steps
of codepoint_at_byte over the bytes, so it is the number of codepoints for c in s yields. O(1) on an ASCII string, else O(n) in the byte length.
Parameters
| s | string | source string. |
Returns
i64 the codepoint count.Constants
POW5_128: u64[] :: @comptime { … 128-bit powers of five, POW5_128[2*(q+342)] = high word, +1 = low word.
Computed at compile time ; see the file header for the algorithm.
REPLACEMENT_CHAR: char :: char(0xFFFD) Unicode replacement character (U+FFFD): the standard stand-in for an undecodable byte or an unpaired UTF-16 surrogate.
Implementations
Methods
add :: fn(self, other: T[]) -> T[] Methods
into :: fn(self) -> Iterator<T> Membership for arrays: v in arr / v !in arr dispatch here. Linear scan
via Equals. As an
impl member, the monomorphised == devirtualises to the element's primitive
comparison on every backend. Blanket impl (orphan rule : Contains is
std/core's, T[] isn't), mirroring the Into blanket above.
Methods
contains :: fn(self, value: T) -> bool [lhs] * n: array repeat / preallocation, the * operator on arrays.
[v] * n repeats the elements n times ([7, 9] * 2 → [7, 9, 7, 9]) ; the
empty-LHS form [] * n is the preallocation primitive (length 0, capacity n:
the with_capacity replacement). * on an array dispatches here through the
normal trait lookup : a concrete array matches this blanket via the "[]"
impl-key (impl_base_key), and the lowerer devirtualises BOTH forms to the
array.repeat intrinsic, which preserves the preallocation form and shallow
ref-element semantics. The body is the logical repeat fallback for any path the
devirt can't statically reach. The return is a fresh array the caller owns.
Blanket impl (orphan rule : Mul is std/core's, T[] isn't), mirroring
Into / Contains.
Methods
mul :: fn(self, other: i64) -> T[] An array's text: [, then each element's own Display separated by , ,
then ]: [1, 2], [a, b], [[1], [2, 3]]. Each element is rendered once,
then written into one buffer sized to fit them all.
Methods
to_string :: fn(self) -> string Methods
into :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
to_string :: fn(self) -> string Methods
hash :: fn(self) -> u64 Methods
hash :: fn(self) -> u64 Methods
hash :: fn(self) -> u64 Methods
hash :: fn(self) -> u64 Methods
hash :: fn(self) -> u64 Methods
hash :: fn(self) -> u64 Methods
hash :: fn(self) -> u64 Methods
hash :: fn(self) -> u64 Methods
hash :: fn(self) -> u64 Methods
compare :: fn(self, other: i8) -> i32 Methods
compare :: fn(self, other: i16) -> i32 Methods
compare :: fn(self, other: i32) -> i32 Methods
compare :: fn(self, other: i64) -> i32 Methods
compare :: fn(self, other: u8) -> i32 Methods
compare :: fn(self, other: u16) -> i32 Methods
compare :: fn(self, other: u32) -> i32 Methods
compare :: fn(self, other: u64) -> i32 Methods
compare :: fn(self, other: char) -> i32 Methods
step :: fn(self) -> i8 Methods
step :: fn(self) -> i16 Methods
step :: fn(self) -> i32 Methods
step :: fn(self) -> i64 Methods
step :: fn(self) -> u8 Methods
step :: fn(self) -> u16 Methods
step :: fn(self) -> u32 Methods
step :: fn(self) -> u64 Methods
step :: fn(self) -> char Methods
zero :: fn() -> i8 Methods
zero :: fn() -> i16 Methods
zero :: fn() -> i32 Methods
zero :: fn() -> i64 Methods
zero :: fn() -> u8 Methods
zero :: fn() -> u16 Methods
zero :: fn() -> u32 Methods
zero :: fn() -> u64 Methods
zero :: fn() -> f32 Methods
zero :: fn() -> f64 Methods
one :: fn() -> i8 Methods
one :: fn() -> i16 Methods
one :: fn() -> i32 Methods
one :: fn() -> i64 Methods
one :: fn() -> u8 Methods
one :: fn() -> u16 Methods
one :: fn() -> u32 Methods
one :: fn() -> u64 Methods
one :: fn() -> f32 Methods
one :: fn() -> f64 Methods
add :: fn(self, other: string) -> string s[i]: the codepoint at codepoint index i, found by walking s from its
start; in an ASCII string, the byte at i. Traps past the last codepoint, where
the walk lands on the length.
Methods
at :: fn(self, i: i64) -> char s[lo..<hi] and s[lo..=hi]: the codepoints of a range, as a string; in an ASCII
string, the bytes of the range. Bounds past the end clamp to it, and a range
ending before it starts gives the empty string.
Methods
at :: fn(self, r: Range<i64>) -> string