No matching definitions.

cstr

stdlib/cstr.tur

byte primitives on raw :cstr values.

Since: 2026-07-01

defn

cstr-len

(cstr-len [s : cstr] :)

byte length of a NUL-terminated C string.

sNUL-terminated C string pointer

Length in bytes, excluding the trailing NUL.

(cstr-len "hello")  ; => 5
defn

cstr-nth

(cstr-nth [s : cstr i : int] :)

byte at index i in a NUL-terminated C string.

sNUL-terminated C string pointer
izero-based byte index; caller must ensure 0 <= i < (cstr-len s)

The unsigned byte value at position i.

(cstr-nth "1+2" 1)  ; => 43  ('+')