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;
+ return npos;
}
size_t wxStringBase::find_first_of(const wxChar* sz, size_t nStart) const
wxDELETEA(m_pItems);
}
+void wxArrayString::reserve(size_t nSize)
+{
+ Alloc(nSize);
+}
+
// pre-allocates memory (frees the previous data!)
void wxArrayString::Alloc(size_t nSize)
{