]> granicus.if.org Git - icinga2/commitdiff
Implement String::FindFirstNotOf.
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 7 Nov 2013 11:17:06 +0000 (12:17 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 7 Nov 2013 15:07:52 +0000 (16:07 +0100)
Refs #2710

lib/base/qstring.cpp
lib/base/qstring.h

index 80e08261a95c9c610ef035ce78c433bb236a4967..c3628120791f04c11ce2184dea812ed731cfc6ac 100644 (file)
@@ -142,6 +142,16 @@ size_t String::FindFirstOf(char ch, size_t pos) const
        return m_Data.find_first_of(ch, pos);
 }
 
+size_t String::FindFirstNotOf(const char *s, size_t pos) const
+{
+       return m_Data.find_first_not_of(s, pos);
+}
+
+size_t String::FindFirstNotOf(char ch, size_t pos) const
+{
+       return m_Data.find_first_not_of(ch, pos);
+}
+
 String String::SubStr(size_t first, size_t len) const
 {
        return m_Data.substr(first, len);
index e26717fca7fc50f6013e2cbc63da140154645095..9ca0e5e5f37c9d766460ebe3b33b48a9010ae5b8 100644 (file)
@@ -81,6 +81,8 @@ public:
        size_t Find(const String& str, size_t pos = 0) const;
        size_t FindFirstOf(const char *s, size_t pos = 0) const;
        size_t FindFirstOf(char ch, size_t pos = 0) const;
+       size_t FindFirstNotOf(const char *s, size_t pos = 0) const;
+       size_t FindFirstNotOf(char ch, size_t pos = 0) const;
        String SubStr(size_t first, size_t len = NPos) const;
        void Replace(size_t first, size_t second, const String& str);