/////////////////////////////////////////////////////////////////////////////
-// Name: tokenzr.cpp
+// Name: src/common/tokenzr.cpp
// Purpose: String tokenizer
// Author: Guilhem Lavaux
// Modified by: Vadim Zeitlin (almost full rewrite)
#endif
#include "wx/tokenzr.h"
-#include "wx/arrstr.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/arrstr.h"
+ #include "wx/crt.h"
+#endif
// Required for wxIs... functions
#include <ctype.h>
// whitespace characters and as wxTOKEN_RET_EMPTY otherwise (for
// whitespace delimiters, strtok() behaviour is better because we want
// to count consecutive spaces as one delimiter)
- const wxChar *p;
- for ( p = delims.c_str(); *p; p++ )
+ wxString::const_iterator p;
+ for ( p = delims.begin(); p != delims.end(); ++p )
{
if ( !wxIsspace(*p) )
break;
}
- if ( *p )
+ if ( p != delims.end() )
{
// not whitespace char in delims
mode = wxTOKEN_RET_EMPTY;