]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/string.cpp
sockets work now an all platforms
[wxWidgets.git] / src / common / string.cpp
index 77026933c0abc56f22083cd9bd768ebad0d80d8e..9d056390460addaaaf1d1c1bd676bcabe599b3db 100644 (file)
@@ -1075,6 +1075,19 @@ bool wxString::Matches(const char *pszMask) const
   return *pszTxt == '\0';
 }
 
+// Count the number of chars
+int wxString::Freq(char ch) const
+{
+    int count = 0;
+    int len = Len();
+    for (int i = 0; i < len; i++)
+    {
+        if (GetChar(i) == ch)
+            count ++;
+    }
+    return count;
+}
+
 // ---------------------------------------------------------------------------
 // standard C++ library string functions
 // ---------------------------------------------------------------------------
@@ -1116,6 +1129,8 @@ size_t wxString::find(const char* sz, size_t nStart, size_t n) const
 }
 #endif
 
+// Gives a duplicate symbol (presumably a case-insensitivity problem)
+#if !defined(__BORLANDC__)
 size_t wxString::find(char ch, size_t nStart) const
 {
   wxASSERT( nStart <= Len() );
@@ -1124,6 +1139,7 @@ size_t wxString::find(char ch, size_t nStart) const
 
   return p == NULL ? npos : p - c_str();
 }
+#endif
 
 size_t wxString::rfind(const wxString& str, size_t nStart) const
 {