Minor additions to make working with binary buffers easier.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -520,6 +520,8 @@ public:
|
|||||||
// append count copies of given character
|
// append count copies of given character
|
||||||
wxString& Append(wxChar ch, size_t count = 1u)
|
wxString& Append(wxChar ch, size_t count = 1u)
|
||||||
{ wxString str(ch, count); return *this << str; }
|
{ wxString str(ch, count); return *this << str; }
|
||||||
|
wxString& Append(const wxChar* psz, size_t nLen)
|
||||||
|
{ ConcatSelf(nLen, psz); return *this; }
|
||||||
|
|
||||||
// prepend a string, return the string itself
|
// prepend a string, return the string itself
|
||||||
wxString& Prepend(const wxString& str)
|
wxString& Prepend(const wxString& str)
|
||||||
@@ -668,6 +670,7 @@ public:
|
|||||||
wxChar *GetWriteBuf(size_t nLen);
|
wxChar *GetWriteBuf(size_t nLen);
|
||||||
// call this immediately after GetWriteBuf() has been used
|
// call this immediately after GetWriteBuf() has been used
|
||||||
void UngetWriteBuf();
|
void UngetWriteBuf();
|
||||||
|
void UngetWriteBuf(size_t nLen);
|
||||||
|
|
||||||
// wxWindows version 1 compatibility functions
|
// wxWindows version 1 compatibility functions
|
||||||
|
|
||||||
|
@@ -528,6 +528,12 @@ void wxString::UngetWriteBuf()
|
|||||||
GetStringData()->Validate(TRUE);
|
GetStringData()->Validate(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxString::UngetWriteBuf(size_t nLen)
|
||||||
|
{
|
||||||
|
GetStringData()->nDataLength = nLen;
|
||||||
|
GetStringData()->Validate(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// data access
|
// data access
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user