summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-14 17:58:02 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-14 21:36:30 (GMT)
commitcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (patch)
tree5c3a874d6e28b297aad599656743a79ec74c94c5 /Swiften/Base/String.cpp
parentde84b90c52a1f367b31eb56beea56c0dceae43f5 (diff)
downloadswift-contrib-cad974b45c0fb9355e68d9728e42c9ae3dbcebc7.zip
swift-contrib-cad974b45c0fb9355e68d9728e42c9ae3dbcebc7.tar.bz2
String refactoring.
Removed String::getLength(). Rewrote String::removeAll().
Diffstat (limited to 'Swiften/Base/String.cpp')
-rw-r--r--Swiften/Base/String.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/Swiften/Base/String.cpp b/Swiften/Base/String.cpp
index 17d49c2..460df36 100644
--- a/Swiften/Base/String.cpp
+++ b/Swiften/Base/String.cpp
@@ -69,24 +69,6 @@ std::pair<String,String> String::getSplittedAtFirst(char c) const {
}
}
-size_t String::getLength() const {
- size_t size = 0, current = 0, end = data_.size();
- while (current < end) {
- size++;
- current += sequenceLength(data_[current]);
- }
- return size;
-}
-
-void String::removeAll(char c) {
- size_t lastPos = 0;
- size_t matchingIndex = 0;
- while ((matchingIndex = data_.find(c, lastPos)) != data_.npos) {
- data_.erase(matchingIndex, 1);
- lastPos = matchingIndex;
- }
-}
-
void String::replaceAll(char c, const String& s) {
size_t lastPos = 0;
size_t matchingIndex = 0;