#ifdef HAVE_STRINGS_H
#include <strings.h> // for strcasecmp()
-#endif // AIX
+#endif // HAVE_STRINGS_H
#include "wx/defs.h" // everybody should include this
#include "wx/wxchar.h" // for wxChar
// conversion to numbers: all functions return TRUE only if the whole string
// is a number and put the value of this number into the pointer provided
// convert to a signed integer
- bool ToLong(long *val) const;
+ bool ToLong(long *val, int base = 0) const;
// convert to an unsigned integer
- bool ToULong(unsigned long *val) const;
+ bool ToULong(unsigned long *val, int base = 0) const;
// convert to a double
bool ToDouble(double *val) const;
size_t Add(const wxString& str);
// add new element at given position
void Insert(const wxString& str, size_t uiIndex);
+ // expand the array to have count elements
+ void SetCount(size_t count);
// remove first item matching this value
void Remove(const wxChar *sz);
// remove item by index
{ Copy(array); }
};
+// ----------------------------------------------------------------------------
+// wxStringBuffer: a tiny class allowing to get a writable pointer into string
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxStringBuffer
+{
+public:
+ wxStringBuffer(wxString& str, size_t lenWanted = 1024)
+ : m_str(str) { m_buf = m_str.GetWriteBuf(lenWanted); }
+
+ ~wxStringBuffer() { m_str.UngetWriteBuf(); }
+
+ operator wxChar*() const { return m_buf; }
+
+private:
+ wxString& m_str;
+ wxChar *m_buf;
+};
+
// ---------------------------------------------------------------------------
// wxString comparison functions: operator versions are always case sensitive
// ---------------------------------------------------------------------------