diff options
Diffstat (limited to 'src/bufstr.h')
-rw-r--r-- | src/bufstr.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bufstr.h b/src/bufstr.h index 4ce1dae..083d5b0 100644 --- a/src/bufstr.h +++ b/src/bufstr.h @@ -93,6 +93,13 @@ class BufStr { return m_writeOffset; } + void dropFromStart(uint bytes) + { + if (bytes>m_size) bytes=m_size; + if (bytes>0) qmemmove(m_buf,m_buf+bytes,m_size-bytes); + m_size-=bytes; + m_writeOffset-=bytes; + } private: void makeRoomFor(uint size) { |