aboutsummaryrefslogtreecommitdiff
path: root/src/common/String.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/String.cpp')
-rw-r--r--src/common/String.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/String.cpp b/src/common/String.cpp
index ca16cee7..21f3f235 100644
--- a/src/common/String.cpp
+++ b/src/common/String.cpp
@@ -39,6 +39,13 @@ String::String(const_pointer str, Index size) {
this->capacity_ = size;
}
+String::String(size_type size, value_type ch) : String() {
+ reserve(size);
+ for (Index i = 0; i < size; i++) {
+ append(ch);
+ }
+}
+
String::String(std::initializer_list<char16_t> l)
: String(l.begin(), l.size()) {}