Added missing wxArrayString::reserve.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23287
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxASSERT( nStart <= length() );
}
wxASSERT( nStart <= length() );
}
- const wxChar *p = wxStrrchr(c_str(), ch);
-
- if ( p == NULL )
- return npos;
+ const wxChar *actual;
+ for ( actual = c_str() + ( nStart == npos ? length() : nStart + 1 );
+ actual > c_str(); --actual )
+ {
+ if ( *(actual - 1) == ch )
+ return (actual - 1) - c_str();
+ }
- size_t result = p - c_str();
- return ( result > nStart ) ? npos : result;
}
size_t wxStringBase::find_first_of(const wxChar* sz, size_t nStart) const
}
size_t wxStringBase::find_first_of(const wxChar* sz, size_t nStart) const
+void wxArrayString::reserve(size_t nSize)
+{
+ Alloc(nSize);
+}
+
// pre-allocates memory (frees the previous data!)
void wxArrayString::Alloc(size_t nSize)
{
// pre-allocates memory (frees the previous data!)
void wxArrayString::Alloc(size_t nSize)
{