summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Base/String.h')
-rw-r--r--Swiften/Base/String.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/Base/String.h b/Swiften/Base/String.h
index c87d82b..7d2f928 100644
--- a/Swiften/Base/String.h
+++ b/Swiften/Base/String.h
@@ -13,6 +13,7 @@
#include <utility>
#include <vector>
#include <cassert>
+#include <algorithm>
#define SWIFTEN_STRING_TO_CFSTRING(a) \
CFStringCreateWithBytes(NULL, reinterpret_cast<const UInt8*>(a.getUTF8Data()), a.getUTF8Size(), kCFStringEncodingUTF8, false)
@@ -48,13 +49,13 @@ namespace Swift {
std::vector<String> split(char c) const;
- size_t getLength() const;
-
String getLowerCase() const {
return boost::to_lower_copy(data_);
}
- void removeAll(char c);
+ void removeAll(char c) {
+ data_.erase(std::remove(data_.begin(), data_.end(), c), data_.end());
+ }
void replaceAll(char c, const String& s);