+ // while leading delims trim 'em from the left
+ while ( ( pos = FindDelims(m_string, m_delims)) == 0 )
+ {
+ m_string = m_string.Mid((size_t)1);
+ }
+}
+
+wxString wxStringTokenizer::NextToken()
+{
+ off_t pos, pos2;
+ wxString r_string;
+
+ if ( m_string.IsEmpty() )
+ return m_string;
+
+ if ( !m_retdelims )
+ EatLeadingDelims();
+
+ pos = FindDelims(m_string, m_delims);
+ if (pos == -1)
+ {
+ r_string = m_string;
+ m_string = wxEmptyString;
+
+ return r_string;
+ }
+
+ if (m_retdelims)
+ {
+ if (!pos)
+ {
+ pos++;
+ pos2 = 1;
+ }
+ else
+ {
+ pos2 = pos;
+ }
+ }
+ else
+ {
+ pos2 = pos + 1;
+ }
+
+ r_string = m_string.Left((size_t)pos);
+ m_string = m_string.Mid((size_t)pos2);