+#if 0
+int wxString::Scanf(const char *pszFormat, ...) const
+{
+ va_list argptr;
+ va_start(argptr, pszFormat);
+
+ int iLen = ScanfV(pszFormat, argptr);
+
+ va_end(argptr);
+
+ return iLen;
+}
+
+int wxString::ScanfV(const char *pszFormat, va_list argptr) const
+{
+#ifdef __WXMSW__
+ wxMessageBox("ScanfV not implemented");
+ return 0;
+#else
+ return vsscanf(c_str(), pszFormat, argptr);
+#endif
+}
+#endif
+
+// ----------------------------------------------------------------------------
+// misc other operations
+// ----------------------------------------------------------------------------
+bool wxString::Matches(const char *pszMask) const
+{
+ // check char by char
+ const char *pszTxt;
+ for ( pszTxt = c_str(); *pszMask != '\0'; pszMask++, pszTxt++ ) {
+ switch ( *pszMask ) {
+ case '?':
+ if ( *pszTxt == '\0' )
+ return FALSE;
+
+ pszTxt++;
+ pszMask++;
+ break;
+
+ case '*':
+ {
+ // ignore special chars immediately following this one
+ while ( *pszMask == '*' || *pszMask == '?' )
+ pszMask++;
+
+ // if there is nothing more, match
+ if ( *pszMask == '\0' )
+ return TRUE;
+
+ // are there any other metacharacters in the mask?
+ uint uiLenMask;
+ const char *pEndMask = strpbrk(pszMask, "*?");
+
+ if ( pEndMask != NULL ) {
+ // we have to match the string between two metachars
+ uiLenMask = pEndMask - pszMask;
+ }
+ else {
+ // we have to match the remainder of the string
+ uiLenMask = strlen(pszMask);
+ }
+
+ wxString strToMatch(pszMask, uiLenMask);
+ const char* pMatch = strstr(pszTxt, strToMatch);
+ if ( pMatch == NULL )
+ return FALSE;
+
+ // -1 to compensate "++" in the loop
+ pszTxt = pMatch + uiLenMask - 1;
+ pszMask += uiLenMask - 1;
+ }
+ break;
+
+ default:
+ if ( *pszMask != *pszTxt )
+ return FALSE;
+ break;
+ }
+ }
+
+ // match only if nothing left
+ return *pszTxt == '\0';
+}
+