harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

cstrings.ha (174B)


      1 type string = struct {
      2 	data: nullable *[*]u8,
      3 	length: size,
      4 	capacity: size,
      5 };
      6 
      7 fn constchar(s: str) *const char = {
      8 	let s = &s: *string;
      9 	return s.data: *const char;
     10 };