#include "internal.h" // len returns the length of the string. int string·len(string s) { Hdr* h = (Hdr*)(s - sizeof(Hdr)); return h->len; } // cap returns the capacity of the string buffer. int string·cap(string s) { Hdr* h = (Hdr*)(s - sizeof(Hdr)); return h->cap; }