Version: 3.3.0
wxStringBuffer Class Reference

#include <wx/string.h>

Detailed Description

This helper class allows you to conveniently access the wxString internal buffer as a writable pointer and automatically determines its length.

This class is similar to wxStringBufferLength, but sets the length of the buffer automatically, by assuming that the string is NUL-terminated.

Library:  wxBase
Category:  Data Structures

Public Member Functions

 wxStringBuffer (wxString &str, size_t len)
 Constructs a writable string buffer object associated with the given string and containing enough space for at least len characters. More...
 
 ~wxStringBuffer ()
 Restores the string passed to the constructor to the usable state. More...
 
wxStringCharTypeoperator wxStringCharType * ()
 Returns the writable pointer to a buffer of the size at least equal to the length specified in the constructor. More...
 

Constructor & Destructor Documentation

◆ wxStringBuffer()

wxStringBuffer::wxStringBuffer ( wxString str,
size_t  len 
)

Constructs a writable string buffer object associated with the given string and containing enough space for at least len characters.

◆ ~wxStringBuffer()

wxStringBuffer::~wxStringBuffer ( )

Restores the string passed to the constructor to the usable state.

Member Function Documentation

◆ operator wxStringCharType *()

wxStringCharType* wxStringBuffer::operator wxStringCharType * ( )

Returns the writable pointer to a buffer of the size at least equal to the length specified in the constructor.