summaryrefslogtreecommitdiff
path: root/core/dvector.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/dvector.h')
-rw-r--r--core/dvector.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/dvector.h b/core/dvector.h
index 53a29738f7..456be41289 100644
--- a/core/dvector.h
+++ b/core/dvector.h
@@ -34,6 +34,7 @@
#include "pool_allocator.h"
#include "safe_refcount.h"
#include "os/rw_lock.h"
+#include "ustring.h"
struct MemoryPool {
@@ -466,6 +467,16 @@ public:
return OK;
}
+ String join(String delimiter) {
+ String rs = "";
+ int s = size();
+ Read r = read();
+ for(int i=0;i<s;i++) {
+ rs += r[i] + delimiter;
+ }
+ rs.erase( rs.length()-delimiter.length(), delimiter.length());
+ return rs;
+ }
bool is_locked() const { return alloc && alloc->lock>0; }