Import with #import "std/byte_text_linux".

TextDescriptor :: struct { data: *u8; length: usize; }
ByteDescriptor :: struct { data: *u8; length: s64; }
TextFromBytes :: (buffer: []u8) -> string
BytesFromPointer :: (data: *u8, count: u64) -> []u8

Borrow native storage at a foreign-function boundary. The caller must keep it allocated and writable throughout the slice's use.

TextFromCString :: (value: *u8) -> string

The returned string borrows the C buffer and retains its lifetime.

Source ↗ · All modules