portable_strndup
extern char *portable_strndup(const char *s, size_t n);
return portable_strndup(context + offset, byte_count);