return &buf[cur_idx];
}
+ char * get_buf_base()
+ {
+ return buf;
+ }
+
int get_contiguous_length(char *ptr)
{
int eidx = cur_idx + length;
return 1;
}
+ // Trim the buffer to the specified length (must be less than current length)
+ void trim_to(int new_length)
+ {
+ length = new_length;
+ }
+
char operator[](int idx) noexcept
{
int dest_idx = cur_idx + idx;