aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/string.c')
-rw-r--r--src/runtime/string.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/runtime/string.c b/src/runtime/string.c
index 27a7581094..fec66f8a82 100644
--- a/src/runtime/string.c
+++ b/src/runtime/string.c
@@ -164,3 +164,12 @@ sys·byteastring(byte *a, int32 l, string s)
mcpy(s->str, a, l);
FLUSH(&s);
}
+
+void
+sys·arraystring(Array *b, string s)
+{
+ s = mal(sizeof(s->len)+b->nel);
+ s->len = b->nel;
+ mcpy(s->str, b->array, s->len);
+ FLUSH(&s);
+}