summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-08-19 19:50:14 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-08-19 19:50:14 (GMT)
commitfffffda255d80a56def292a9f7adf101382bee1a (patch)
treefe10f9559c04f57873ccd26e07157bcf9de6aa56 /Swiften/Base/String.h
parent72d22d91c99e2b1bd3c2abc712195111a434fcfc (diff)
downloadswift-contrib-fffffda255d80a56def292a9f7adf101382bee1a.zip
swift-contrib-fffffda255d80a56def292a9f7adf101382bee1a.tar.bz2
Added getExecutablePath().
Diffstat (limited to 'Swiften/Base/String.h')
-rw-r--r--Swiften/Base/String.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swiften/Base/String.h b/Swiften/Base/String.h
index 03d9029..b05edba 100644
--- a/Swiften/Base/String.h
+++ b/Swiften/Base/String.h
@@ -66,6 +66,10 @@ namespace Swift {
return data_.size() > 0 && data_[data_.size()-1] == c;
}
+ bool endsWith(const String& s) const {
+ return data_.substr(data_.size() - s.data_.size(), data_.npos) == s;
+ }
+
String getSubstring(size_t begin, size_t end) const {
return String(data_.substr(begin, end));
}