aboutsummaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/string.c b/string.c
index d174ed4..d788f58 100644
--- a/string.c
+++ b/string.c
@@ -29,4 +29,6 @@ Str *Str_copy(Arena *a, byte *data, size len) {
return str;
}
-void Str_print(Str s) { printf("%.*s", (int)s.len, s.data); }
+int Str_fprint(FILE *w, Str s) {
+ return fprintf(w, "%.*s", (int)s.len, s.data);
+}