+ InitWith(str.c_str(), nPos, nLen == npos ? 0 : nLen);
+ }
+ // take all characters from pStart to pEnd
+ wxString(const void *pStart, const void *pEnd);
+
+ // lib.string.capacity
+ // return the length of the string
+ size_t size() const { return Len(); }
+ // return the length of the string
+ size_t length() const { return Len(); }
+ // return the maximum size of the string
+ size_t max_size() const { return wxSTRING_MAXLEN; }
+ // resize the string, filling the space with c if c != 0
+ void resize(size_t nSize, wxChar ch = wxT('\0'));
+ // delete the contents of the string
+ void clear() { Empty(); }
+ // returns true if the string is empty
+ bool empty() const { return IsEmpty(); }
+ // inform string about planned change in size
+ void reserve(size_t sz) { Alloc(sz); }
+
+ // lib.string.access
+ // return the character at position n
+ wxChar at(size_t n) const { return GetChar(n); }
+ // returns the writable character at position n
+ wxChar& at(size_t n) { return GetWritableChar(n); }
+
+ // first valid index position
+ const_iterator begin() const { return wx_str(); }
+ // position one after the last valid one
+ const_iterator end() const { return wx_str() + length(); }
+
+ // lib.string.modifiers
+ // append a string
+ wxString& append(const wxString& str)
+ { *this += str; return *this; }
+ // append elements str[pos], ..., str[pos+n]
+ wxString& append(const wxString& str, size_t pos, size_t n)
+ { ConcatSelf(n, str.c_str() + pos); return *this; }
+ // append first n (or all if n == npos) characters of sz
+ wxString& append(const wxChar *sz, size_t n = npos)
+ { ConcatSelf(n == npos ? wxStrlen(sz) : n, sz); return *this; }
+
+ // append n copies of ch
+ wxString& append(size_t n, wxChar ch) { return Pad(n, ch); }
+
+ // same as `this_string = str'
+ wxString& assign(const wxString& str)
+ { return *this = str; }
+ // same as ` = str[pos..pos + n]
+ wxString& assign(const wxString& str, size_t pos, size_t n)
+ { Empty(); return Append(str.c_str() + pos, n); }
+ // same as `= first n (or all if n == npos) characters of sz'
+ wxString& assign(const wxChar *sz, size_t n = npos)
+ { Empty(); return Append(sz, n == npos ? wxStrlen(sz) : n); }
+ // same as `= n copies of ch'
+ wxString& assign(size_t n, wxChar ch)
+ { Empty(); return Append(ch, n); }
+
+ // insert another string
+ wxString& insert(size_t nPos, const wxString& str);
+ // insert n chars of str starting at nStart (in str)
+ wxString& insert(size_t nPos, const wxString& str, size_t nStart, size_t n)
+ { return insert(nPos, wxString((const wxChar *)str + nStart, n)); }
+
+ // insert first n (or all if n == npos) characters of sz
+ wxString& insert(size_t nPos, const wxChar *sz, size_t n = npos)
+ { return insert(nPos, wxString(sz, n)); }
+ // insert n copies of ch
+ wxString& insert(size_t nPos, size_t n, wxChar ch)
+ { return insert(nPos, wxString(ch, n)); }
+
+ // delete characters from nStart to nStart + nLen
+ wxString& erase(size_t nStart = 0, size_t nLen = npos);
+
+ // replaces the substring of length nLen starting at nStart
+ wxString& replace(size_t nStart, size_t nLen, const wxChar* sz);
+ // replaces the substring with nCount copies of ch
+ wxString& replace(size_t nStart, size_t nLen, size_t nCount, wxChar ch);
+ // replaces a substring with another substring
+ wxString& replace(size_t nStart, size_t nLen,
+ const wxString& str, size_t nStart2, size_t nLen2);
+ // replaces the substring with first nCount chars of sz
+ wxString& replace(size_t nStart, size_t nLen,
+ const wxChar* sz, size_t nCount);
+
+ // swap two strings
+ void swap(wxString& str);
+
+ // All find() functions take the nStart argument which specifies the
+ // position to start the search on, the default value is 0. All functions
+ // return npos if there were no match.
+
+ // find a substring
+ size_t find(const wxString& str, size_t nStart = 0) const;
+
+ // VC++ 1.5 can't cope with this syntax.
+#if !defined(__VISUALC__) || defined(__WIN32__)
+ // find first n characters of sz
+ size_t find(const wxChar* sz, size_t nStart = 0, size_t n = npos) const;
+#endif // VC++ 1.5
+
+ // Gives a duplicate symbol (presumably a case-insensitivity problem)
+#if !defined(__BORLANDC__)
+ // find the first occurence of character ch after nStart
+ size_t find(wxChar ch, size_t nStart = 0) const;
+#endif
+ // rfind() family is exactly like find() but works right to left
+
+ // as find, but from the end
+ size_t rfind(const wxString& str, size_t nStart = npos) const;
+
+ // VC++ 1.5 can't cope with this syntax.
+#if !defined(__VISUALC__) || defined(__WIN32__)
+ // as find, but from the end
+ size_t rfind(const wxChar* sz, size_t nStart = npos,
+ size_t n = npos) const;
+ // as find, but from the end
+ size_t rfind(wxChar ch, size_t nStart = npos) const;
+#endif // VC++ 1.5
+
+ // find first/last occurence of any character in the set
+
+ // as strpbrk() but starts at nStart, returns npos if not found
+ size_t find_first_of(const wxString& str, size_t nStart = 0) const
+ { return find_first_of(str.c_str(), nStart); }
+ // same as above
+ size_t find_first_of(const wxChar* sz, size_t nStart = 0) const;
+ // same as find(char, size_t)
+ size_t find_first_of(wxChar c, size_t nStart = 0) const
+ { return find(c, nStart); }
+ // find the last (starting from nStart) char from str in this string
+ size_t find_last_of (const wxString& str, size_t nStart = npos) const
+ { return find_last_of(str.c_str(), nStart); }
+ // same as above
+ size_t find_last_of (const wxChar* sz, size_t nStart = npos) const;
+ // same as above
+ size_t find_last_of(wxChar c, size_t nStart = npos) const
+ { return rfind(c, nStart); }
+
+ // find first/last occurence of any character not in the set
+
+ // as strspn() (starting from nStart), returns npos on failure
+ size_t find_first_not_of(const wxString& str, size_t nStart = 0) const
+ { return find_first_not_of(str.c_str(), nStart); }
+ // same as above
+ size_t find_first_not_of(const wxChar* sz, size_t nStart = 0) const;
+ // same as above
+ size_t find_first_not_of(wxChar ch, size_t nStart = 0) const;
+ // as strcspn()
+ size_t find_last_not_of(const wxString& str, size_t nStart = npos) const
+ { return find_first_not_of(str.c_str(), nStart); }
+ // same as above
+ size_t find_last_not_of(const wxChar* sz, size_t nStart = npos) const;
+ // same as above
+ size_t find_last_not_of(wxChar ch, size_t nStart = npos) const;
+
+ // All compare functions return -1, 0 or 1 if the [sub]string is less,
+ // equal or greater than the compare() argument.
+
+ // just like strcmp()
+ int compare(const wxString& str) const { return Cmp(str); }
+ // comparison with a substring
+ int compare(size_t nStart, size_t nLen, const wxString& str) const
+ { return Mid(nStart, nLen).Cmp(str); }
+ // comparison of 2 substrings
+ int compare(size_t nStart, size_t nLen,
+ const wxString& str, size_t nStart2, size_t nLen2) const
+ { return Mid(nStart, nLen).Cmp(str.Mid(nStart2, nLen2)); }
+ // just like strcmp()
+ int compare(const wxChar* sz) const { return Cmp(sz); }
+ // substring comparison with first nCount characters of sz
+ int compare(size_t nStart, size_t nLen,
+ const wxChar* sz, size_t nCount = npos) const
+ { return Mid(nStart, nLen).Cmp(wxString(sz, nCount)); }
+
+ // substring extraction
+ wxString substr(size_t nStart = 0, size_t nLen = npos) const
+ { return Mid(nStart, nLen); }
+#endif // wxSTD_STRING_COMPATIBILITY