summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 86485e3c..95a93c01 100644
--- a/lib.c
+++ b/lib.c
@@ -3300,6 +3300,15 @@ val string_8bit(const unsigned char *str)
return string_own(wstr);
}
+val string_8bit_size(const unsigned char *str, size_t sz)
+{
+ size_t i;
+ wchar_t *wstr = chk_wmalloc(sz);
+ for (i = 0; i < sz; i++)
+ wstr[i] = str[i];
+ return string_own(wstr);
+}
+
val mkstring(val len, val ch)
{
size_t l = c_num(len);