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.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/runtime/string.c b/src/runtime/string.c
index d7393ef6ed..04cf06bc3c 100644
--- a/src/runtime/string.c
+++ b/src/runtime/string.c
@@ -181,6 +181,28 @@ sys·arraystring(Array b, String s)
FLUSH(&s);
}
+void
+sys·arraystringi(Array b, String s)
+{
+ int32 siz, i;
+ int32 *a;
+ byte dum[8];
+
+ a = (int32*)b.array;
+ siz = 0;
+ for(i=0; i<b.nel; i++) {
+ siz += runetochar(dum, a[i]);
+ }
+
+ s = gostringsize(siz);
+ siz = 0;
+ for(i=0; i<b.nel; i++) {
+ siz += runetochar(s.str+siz, a[i]);
+ }
+
+ FLUSH(&s);
+}
+
enum
{
Runeself = 0x80,