cmp
pub fn cmp(a: ref u8, b: ref u8) i64Compare two raw strings.
fn alloc_in[T: allocators.Allocator](ac: T, size: i64) ref voidfn alloc_substr_in[T: allocators.Allocator](ac: T, src: ref u8, start: i64, len: i64) ref u8pub fn cmp(a: ref u8, b: ref u8) i64Compare two raw strings.
pub fn eql(a: ref u8, b: ref u8) boolCompare two null-terminated C strings for equality.
Null is tolerated: two null pointers compare equal, while a null pointer never equals a non-null str.
pub fn len(s: ref u8) i64Length of a raw u8 pointer
pub fn starts_with(s: ref u8, prefix: ref u8) boolReturns true if s starts with prefix
pub fn ends_with(s: ref u8, suffix: ref u8) boolpub fn contains(haystack: ref u8, needle: ref u8) bool = trust { ... }Returns true when needle occurs anywhere in haystack.
pub fn concat(a: ref u8, b: ref u8) ref u8 = trust { ... }Concat raw u8 pointers — returns a new heap-allocated ref u8
pub fn byte_at(s: ref u8, i: i64) option[u8]Get byte at index i from raw u8 pointer, returns none if out of bounds
pub fn trim_prefix[T: allocators.Allocator](ac: T, s: ref u8, prefix: ref u8) ref u8If s starts with prefix, return a new ref u8 without it, otherwise clone.
pub fn trim_suffix[T: allocators.Allocator](ac: T, s: ref u8, suffix: ref u8) ref u8If s ends with suffix, return a new ref u8 without it, otherwise clone.
pub fn substr(src: ref u8, start: i64, len: i64) ref u8 = trust { ... }Return a new ref u8 containing the substring of src starting at start with length len.
pub fn copy(dst: ref u8, dst_off: i64, src: ref u8) void = trust { ... }Copy len bytes from src to dst, starting at offset dst_off in dst. The result is NOT null-terminated beyond what was already there.