git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50958
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxString eol = GetEOL(type), result;
// optimization: we know that the length of the new string will be about
wxString eol = GetEOL(type), result;
// optimization: we know that the length of the new string will be about
- // the same as the length of the old one, so prealloc memory to aviod
+ // the same as the length of the old one, so prealloc memory to avoid
// unnecessary relocations
result.Alloc(text.Len());
wxChar chLast = 0;
// unnecessary relocations
result.Alloc(text.Len());
wxChar chLast = 0;
- for ( const wxChar *pc = text.c_str(); *pc; pc++ )
+ for ( wxString::const_iterator i = text.begin(); i != text.end(); ++i )
switch ( ch ) {
case _T('\n'):
// Dos/Unix line termination
switch ( ch ) {
case _T('\n'):
// Dos/Unix line termination