summaryrefslogtreecommitdiffstats
path: root/src/bufstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bufstr.h')
-rw-r--r--src/bufstr.h7
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)
{