diff options
| author | AlexHolly | 2017-02-23 19:41:10 +0100 |
|---|---|---|
| committer | AlexHolly | 2017-03-01 16:30:34 +0100 |
| commit | 9f7ce79ea37777997b3c7988dbbdfb2cc4b4597d (patch) | |
| tree | a6327226aeda80336748c446979566f781591dd7 /core/dvector.h | |
| parent | 46b22674989709a145b89c73cd18be06592c46f9 (diff) | |
| download | godot-9f7ce79ea37777997b3c7988dbbdfb2cc4b4597d.tar.gz godot-9f7ce79ea37777997b3c7988dbbdfb2cc4b4597d.tar.zst godot-9f7ce79ea37777997b3c7988dbbdfb2cc4b4597d.zip | |
Diffstat (limited to 'core/dvector.h')
| -rw-r--r-- | core/dvector.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/dvector.h b/core/dvector.h index 53a29738f..456be4128 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; } |
