No matching definitions.

frame/ownstr

src/frame/ownstr.tur

owned String surface for the frame spice.

Since: FR-string (0.x)

defopaque

String

(String)

an owned, refcounted, immutable string (ABI: ptr<void>).

defn

adopt-cstr

(adopt-cstr [s : cstr] :)
defn

to-cstr

(to-cstr [s : String] :)

borrow the String's NUL-terminated bytes (O(1), no copy).

sthe String to borrow from

cstr -- a borrowed view of the same bytes.

Since: FR-string (0.x)

defn

release

(release [s : String] :)

decrement the refcount; free the payload at zero.

sthe String whose owning handle is being dropped

Since: FR-string (0.x)

defn

str-len

(str-len [s : String] :)

byte length of the String (not counting the NUL).

sthe String to measure

int -- the byte length.

Since: FR-string (0.x)

Internal definitions
__adopt-cstr-raw-- take ownership of a freshly heap-allocated cstr as a String.