Index: compiled/String.h |
=================================================================== |
--- a/compiled/String.h |
+++ b/compiled/String.h |
@@ -343,16 +343,28 @@ public: |
return; |
assert(source, u"Null buffer passed to OwnedString.append()"_str); |
size_t oldLength = length(); |
grow(sourceLen); |
std::memcpy(mBuf + oldLength, source, sizeof(value_type) * sourceLen); |
} |
+ void append(const char* source, size_type sourceLen) |
+ { |
+ if (!sourceLen) |
+ return; |
+ |
+ assert(source, u"Null buffer passed to OwnedString.append()"_str); |
+ size_t oldLength = length(); |
+ grow(sourceLen); |
+ for (size_t i = 0; i < sourceLen; i++) |
+ mBuf[oldLength + i] = source[i]; |
+ } |
+ |
void append(const String& str) |
{ |
append(str.mBuf, str.length()); |
} |
void append(value_type c) |
{ |
append(&c, 1); |