+// ----------------------------------------------------------------------------
+// helpers
+// ----------------------------------------------------------------------------
+
+static wxString::const_iterator
+find_first_of(const wxChar *delims, size_t len,
+ const wxString::const_iterator& from,
+ const wxString::const_iterator& end)
+{
+ wxASSERT_MSG( from <= end, wxT("invalid index") );
+
+ for ( wxString::const_iterator i = from; i != end; ++i )
+ {
+ if ( wxTmemchr(delims, *i, len) )
+ return i;
+ }
+
+ return end;
+}
+
+static wxString::const_iterator
+find_first_not_of(const wxChar *delims, size_t len,
+ const wxString::const_iterator& from,
+ const wxString::const_iterator& end)
+{
+ wxASSERT_MSG( from <= end, wxT("invalid index") );
+
+ for ( wxString::const_iterator i = from; i != end; ++i )
+ {
+ if ( !wxTmemchr(delims, *i, len) )
+ return i;
+ }
+
+ return end;
+}
+