summaryrefslogtreecommitdiff
path: root/zen/string_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'zen/string_base.h')
-rw-r--r--zen/string_base.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/zen/string_base.h b/zen/string_base.h
index e4e21716..e38fab94 100644
--- a/zen/string_base.h
+++ b/zen/string_base.h
@@ -209,6 +209,8 @@ public:
typedef Char& reference;
typedef const Char& const_reference;
typedef Char value_type;
+
+ Zbase(const_iterator first, const_iterator last);
Char* begin();
Char* end ();
const Char* begin() const;
@@ -338,6 +340,17 @@ Zbase<Char, SP, AP>::Zbase(const Char* source, size_t sourceLen)
}
+template <class Char, template <class, class> class SP, class AP>
+Zbase<Char, SP, AP>::Zbase(const_iterator first, const_iterator last)
+{
+ assert(first <= last);
+ const size_t sourceLen = last - first;
+ rawStr = this->create(sourceLen);
+ std::copy(first, last, rawStr);
+ rawStr[sourceLen] = 0;
+}
+
+
template <class Char, template <class, class> class SP, class AP> inline
Zbase<Char, SP, AP>::Zbase(const Zbase<Char, SP, AP>& source)
{
bgstack15