aboutsummaryrefslogtreecommitdiff
path: root/common/str.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/str.h')
-rw-r--r--common/str.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/str.h b/common/str.h
index dede87a005..f156290e94 100644
--- a/common/str.h
+++ b/common/str.h
@@ -180,6 +180,7 @@ public:
inline uint size() const { return _size; }
inline bool empty() const { return (_size == 0); }
+ char firstChar() const { return (_size > 0) ? _str[0] : 0; }
char lastChar() const { return (_size > 0) ? _str[_size - 1] : 0; }
char operator[](int idx) const {
@@ -217,6 +218,11 @@ public:
*/
void trim();
+ /**
+ * Add a path component
+ */
+ String stringByAppendingPathComponent(String component, char sep = '/') const;
+
uint hash() const;
/**