No matching definitions.

regex/ownstr

src/regex/ownstr.tur

owned String surface for the regex spice.

Since: 0.3.0

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: 0.3.0

defn

release

(release [s : String] :)

decrement the refcount; free the payload at zero.

sthe String whose owning handle is being dropped

Since: 0.3.0

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: 0.3.0

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